RepoPilotOpen in app →

jmacdonald/amp

A complete text editor for your terminal.

Mixed

Single-maintainer risk — review before adopting

weakest axis
Use as dependencyConcerns

non-standard license (Other); top contributor handles 92% of recent commits

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 3d ago
  • 5 active contributors
  • Other licensed
Show all 7 evidence items →
  • CI configured
  • Tests present
  • Single-maintainer risk — top contributor 92% of recent commits
  • Non-standard license (Other) — review terms
What would change the summary?
  • Use as dependency ConcernsMixed if: clarify license terms

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Forkable" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/jmacdonald/amp?axis=fork)](https://repopilot.app/r/jmacdonald/amp)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/jmacdonald/amp on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: jmacdonald/amp

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/jmacdonald/amp shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

WAIT — Single-maintainer risk — review before adopting

  • Last commit 3d ago
  • 5 active contributors
  • Other licensed
  • CI configured
  • Tests present
  • ⚠ Single-maintainer risk — top contributor 92% of recent commits
  • ⚠ Non-standard license (Other) — review terms

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live jmacdonald/amp repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/jmacdonald/amp.

What it runs against: a local clone of jmacdonald/amp — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in jmacdonald/amp | Confirms the artifact applies here, not a fork | | 2 | License is still Other | Catches relicense before you depend on it | | 3 | Default branch main exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 33 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>jmacdonald/amp</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of jmacdonald/amp. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/jmacdonald/amp.git
#   cd amp
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of jmacdonald/amp and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "jmacdonald/amp(\\.git)?\\b" \\
  && ok "origin remote is jmacdonald/amp" \\
  || miss "origin remote is not jmacdonald/amp (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(Other)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"Other\"" package.json 2>/dev/null) \\
  && ok "license is Other" \\
  || miss "license drift — was Other at generation time"

# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
  && ok "default branch main exists" \\
  || miss "default branch main no longer exists"

# 4. Critical files exist
test -f "src/main.rs" \\
  && ok "src/main.rs" \\
  || miss "missing critical file: src/main.rs"
test -f "src/models/application/mod.rs" \\
  && ok "src/models/application/mod.rs" \\
  || miss "missing critical file: src/models/application/mod.rs"
test -f "src/commands/mod.rs" \\
  && ok "src/commands/mod.rs" \\
  || miss "missing critical file: src/commands/mod.rs"
test -f "src/input/mod.rs" \\
  && ok "src/input/mod.rs" \\
  || miss "missing critical file: src/input/mod.rs"
test -f "src/models/application/modes/mod.rs" \\
  && ok "src/models/application/modes/mod.rs" \\
  || miss "missing critical file: src/models/application/modes/mod.rs"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 33 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~3d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/jmacdonald/amp"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

Amp is a terminal-based modal text editor written in Rust, inspired by Vi/Vim, that simplifies the Vim interaction model while bundling modern editor essentials like syntax highlighting, workspace management, and search. It uses the separate scribe crate (jmacdonald/scribe) for core data structures and rendering, and compiles TextMate theme definitions at build time via the theme compiler in build/theme_compiler/. Monolithic Rust binary with modular command structure: src/commands/ segregates application/buffer/confirm logic, build/ contains the theme compiler as a separate build-time module. Core UI and data structures delegate to the external scribe crate (version 0.10). Terminal I/O uses termion 2.0, and syntax highlighting is powered by syntect 5.1 with pre-compiled themes.

👥Who it's for

Terminal power users and developers who want a Vim-like editor with modern conveniences but lower complexity than full Vim. Contributors familiar with Rust, modal editing, and terminal UI development who want to extend or improve a complete editor implementation.

🌱Maturity & risk

Actively maintained and production-ready: version 0.7.1 with CI/CD pipelines (.github/workflows/test.yml and release.yml), comprehensive documentation at amp.rs, and a separate stable scribe dependency (0.10). The codebase is well-structured with architecture docs (docs/architecture.md) and conventions documented (docs/conventions.md), indicating maturity beyond hobby-project status.

Single-maintainer repository (Jordan MacDonald) with moderate but manageable dependencies (~15 direct deps including syntect, termion, git2, bloodhound). Risk is low for core functionality but increases if upstream scribe crate receives breaking changes. No visible CI failures indicated, though the reliance on custom build-time theme compilation (build/theme_compiler/) is a potential complexity point for contributors unfamiliar with Rust procedural macros.

Active areas of work

The repository is in active maintenance phase (v0.7.1). Recent work appears focused on stability and CI/CD (evidenced by test.yml and release.yml workflows). The .agents/ directory with SKILL.md files for syntax-definition and theme-definition suggests integration with Claude agents for AI-assisted feature development.

🚀Get running

git clone https://github.com/jmacdonald/amp.git
cd amp
cargo build --release
./target/release/amp

Daily commands:

cargo run --release

For development with logging: ```bash RUST_LOG=debug cargo run

🗺️Map of the codebase

  • src/main.rs — Application entry point that initializes the editor, handles terminal setup, and orchestrates the main event loop.
  • src/models/application/mod.rs — Core Application model managing state, modes, buffers, and the central event dispatch logic—all editing commands flow through here.
  • src/commands/mod.rs — Command trait definitions and routing that translates user input into application state mutations across all editor modes.
  • src/input/mod.rs — Keyboard input handling and key-mapping system that reads terminal events and translates them into executable commands.
  • src/models/application/modes/mod.rs — Mode system abstraction (Insert, Normal, Command, Jump, etc.) that determines which commands are available and how UI renders.
  • build/theme_compiler/mod.rs — Build-time theme compilation from TextMate format to internal representation—critical for syntax highlighting pipeline.
  • src/models/application/preferences/mod.rs — User preferences and configuration loading that affects all runtime behavior including keybindings and UI appearance.

🛠️How to make changes

Add a new editor command

  1. Create a new command struct in a new or existing file under src/commands/, implementing the Command trait with execute() method (src/commands/your_feature.rs)
  2. Register the command in the mod.rs dispatcher by adding a match arm in the execute_command function (src/commands/mod.rs)
  3. Optionally expose the command in the appropriate mode (Insert, Normal, Command) via that mode's available_commands() (src/models/application/modes/mod.rs)
  4. Add keybindings in the default key map, or document how users can bind the command in their config (src/input/key_map/default.yml)

Add a new application mode

  1. Create a new mode struct in src/models/application/modes/ implementing the Mode trait with enter(), available_commands(), and render() (src/models/application/modes/your_mode.rs)
  2. Add the mode variant to the ApplicationMode enum in src/models/application/modes/mod.rs (src/models/application/modes/mod.rs)
  3. Register mode transitions in Application::switch_mode() in src/models/application/mod.rs (src/models/application/mod.rs)
  4. Create a presenter for the mode in src/presenters/modes/ to handle rendering logic (src/presenters/modes/your_mode.rs)

Add support for a new syntax or theme

  1. Add TextMate syntax or theme definition file to the assets directory (compiled at build time) (build/theme_compiler/textmate.rs)
  2. Extend the build script to include the new definition in the theme_compiler (build/main.rs)
  3. The syntect dependency in Cargo.toml handles TextMate format; ensure definitions follow the standard (Cargo.toml)
  4. Update syntax_loader to register new syntax with the highlighter on application startup (src/models/application/syntax_loader.rs)

Add a new user preference setting

  1. Add the new field to the Preferences struct in src/models/application/preferences/mod.rs with serde derive (src/models/application/preferences/mod.rs)
  2. Add the default value in the default YAML preferences file (src/models/application/preferences/default.yml)
  3. Update Application initialization to apply the preference at startup (typically in src/models/application/mod.rs) (src/models/application/mod.rs)
  4. Add a command (typically in src/commands/preferences.rs) to allow users to modify the setting at runtime (src/commands/preferences.rs)

🔧Why these technologies

  • Rust — Memory safety, zero-cost abstractions, and performance required for responsive terminal UI without GC pauses
  • Termion (terminal handling) — Pure Rust library for raw terminal control without external dependencies, enabling portable terminal manipulation
  • Syntect (syntax highlighting) — Reuses TextMate grammars and themes, enabling rich syntax support with minimal custom code
  • Scribe (external crate) — Encapsulates complex text data structures and buffer management, reducing complexity in the main editor
  • YAML for configuration — Human-readable format for key maps, preferences, and theme definitions; easy to parse at build and runtime

⚖️Trade-offs already made

  • Mode-based architecture (Vi/Vim inspired) instead of modeless editing

    • Why: Enables powerful keyboard-only workflows and reduces cognitive load by contextualizing available commands
    • Consequence: Steeper learning curve for non-Vi users; requires mental mode switching but rewards power users
  • TextMate theme compilation at build time rather than runtime

    • Why: Removes parsing overhead and enables theme validation during development
    • Consequence: Theme changes require rebuild; no hot-reload of themes, but faster startup and guaranteed correctness
  • Terminal-only UI (no GUI)

    • Why: Minimal external dependencies, works over SSH, maximizes portability and user control
    • Consequence: Limited to terminal capabilities; no rich graphical overlays, but editor remains lightweight and terminal-native
  • Single-threaded event loop with synchronous command execution

    • Why: Simplifies reasoning about state; avoids race conditions and deadlock complexity
    • Consequence: Blocking operations (file I/O, syntax parsing) can freeze UI; long operations require async refactoring

🚫Non-goals (don't propose these)

  • Real-time collaboration or multi-user editing
  • Non-terminal graphical user interface (GUI)
  • Language-specific IDE features (LSP integration out of scope for core)
  • Plugin system with external code execution
  • Windows native support (terminal-based, not WinAPI)

🪤Traps & gotchas

Build-time compilation: The theme compiler in build/main.rs compiles themes during cargo build, so theme changes require a full rebuild. Scribe dependency: Core editor logic is in the external scribe crate (jmacdonald/scribe v0.10); many features require understanding that crate's API. Terminal capabilities: Relies on termion 2.0 which requires specific terminal capabilities; may not work on minimal terminals. Signal handling: Uses signal-hook-mio for SIGWINCH (resize) handling; signal behavior differs on Windows. Clipboard: Requires cli-clipboard 0.4 which may need system-level clipboard availability.

🏗️Architecture

💡Concepts to learn

  • Modal editing — Core to Amp's interaction model (inspired by Vim); understanding modes (normal/insert/visual) is essential to predict command behavior and extend it
  • TextMate theme format — Amp compiles TextMate-format themes at build time via build/theme_compiler/; contributors must understand this format to add or modify themes
  • Signal handling (SIGWINCH) — Used via signal-hook-mio to detect terminal resize events; critical for responsive terminal UI updates and understanding the event loop
  • Syntax highlighting via Sublime Text scopes — Syntect uses Sublime Text syntax definitions and scopes to tokenize code; understanding scopes is needed to map syntax tokens to theme colors
  • Build-time code generation — Amp uses build.rs for compile-time theme validation and compilation; essential for understanding why changes to themes require full rebuilds
  • CRDT (Conflict-free Replicated Data Types) — The scribe crate likely uses CRDTs for text buffer operations to ensure consistency; relevant for understanding how edits propagate through the editor
  • Memory-mapped terminal control via termion — Termion provides raw terminal control without complex ncurses bindings; understanding its primitives (cursor positioning, color codes) explains how Amp renders to the terminal
  • jmacdonald/scribe — The core data structures and editor logic library that amp depends on (v0.10); understanding this is essential for modifying editor behavior
  • vim/vim — The direct inspiration for Amp's modal interaction model; reference for command design and keybinding philosophy
  • helix-editor/helix — Alternative modern terminal editor written in Rust with similar goals; useful for understanding alternative approaches to modal editing and syntax highlighting
  • neovim/neovim — Modern fork of Vim with better extensibility; relevant for understanding how Amp differs in simplicity vs. extensibility tradeoffs
  • syntect-rs/syntect — The syntax highlighting library Amp uses (v5.1); required reading for understanding how themes and syntax definitions are processed

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add integration tests for src/commands/ modules

The src/commands/ directory contains 12 command modules (application.rs, buffer.rs, cursor.rs, search.rs, etc.) but there are no visible integration or unit tests in the repo structure. Given that commands are core to a text editor's functionality, comprehensive tests would prevent regressions and make contributions safer. This is especially important for complex commands like search.rs, jump.rs, and git.rs.

  • [ ] Create tests/commands/ directory structure mirroring src/commands/
  • [ ] Add integration tests for src/commands/search.rs covering regex patterns and selections
  • [ ] Add tests for src/commands/cursor.rs verifying cursor movement edge cases
  • [ ] Add tests for src/commands/buffer.rs covering insertion, deletion, and undo operations
  • [ ] Update Cargo.toml [[test]] configuration if needed for integration tests
  • [ ] Document testing patterns in docs/conventions.md

Document the build system and theme compiler in build/

The build/main.rs and build/theme_compiler/ modules handle non-trivial build logic (theme compilation from TextMate format), but there's no documentation explaining how the build process works or how to extend it. CLAUDE.md mentions agent skills for theme-definition but doesn't explain the compiler architecture. New contributors need guidance on modifying theme compilation.

  • [ ] Create docs/build-system.md explaining build/main.rs purpose and flow
  • [ ] Document the theme_compiler pipeline: parsed.rs → validated.rs → textmate.rs conversions
  • [ ] Add inline documentation comments to build/theme_compiler/mod.rs explaining the validation stages
  • [ ] Document the TextMate to Amp theme format conversion in build/theme_compiler/textmate.rs
  • [ ] Add examples of extending the theme compiler for new token types

Add missing GitHub Actions for linting and security scanning

The .github/workflows/ directory only contains release.yml and test.yml. For a Rust project with security-sensitive features (git2 dependency, clipboard handling via cli-clipboard, file I/O via app_dirs2), there are no automated checks for clippy lints, security vulnerabilities, or formatting. Adding these prevents technical debt accumulation.

  • [ ] Create .github/workflows/lint.yml running 'cargo clippy --all-targets --all-features' with error-on-warnings
  • [ ] Create .github/workflows/format.yml running 'cargo fmt --check' to enforce consistent code style
  • [ ] Create .github/workflows/security.yml using cargo-audit or cargo-deny to scan dependencies for CVEs
  • [ ] Configure these workflows to run on pull requests and commits to main
  • [ ] Update CONTRIBUTING.md or docs/conventions.md with pre-commit hooks matching CI checks

🌿Good first issues

  • Add clipboard integration tests: The cli-clipboard crate is integrated (Cargo.toml) but no test coverage visible in benches/ or src/commands/; add tests in src/commands/ to verify clipboard read/write across platforms
  • Document the scribe crate integration: docs/architecture.md exists but doesn't explain the scribe 0.10 API surface; write a guide under documentation/pages/ showing which scribe types are used where in src/commands/
  • Extend theme compiler validation: build/theme_compiler/validated.rs validates themes but the token-color-standard.md is not enforced at compile time; add stricter validation rules that check all required token types

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 4519902 — Make transparent background rendering opt-in (#316) (jmacdonald)
  • 87c069d — Improve built-in theme pipeline/format (#314) (jmacdonald)
  • ce3c4d5 — Initial Dockerfile syntax support (jmacdonald)
  • 2e52c17 — Remove directory check from syntax bundling (jmacdonald)
  • 3bb838c — Properly deinit the terminal when dropping (jmacdonald)
  • 701db09 — Pretty-print backtrace frames (jmacdonald)
  • bd3590e — Add initial Just syntax definition (jmacdonald)
  • ed22010 — Add syntax definition skill and test harness (jmacdonald)
  • 7d979eb — Add support for bundled syntax definitions (jmacdonald)
  • 4031a82 — Fix clipboard contents always being interpreted as inline (jmacdonald)

🔒Security observations

The Amp text editor codebase demonstrates good security posture overall. As a Rust-based terminal application with no network services or database components, it avoids many common vulnerability classes. The main security considerations are: (1) keeping dependencies up-to-date, particularly regex and git2; (2) reviewing the rationale behind disabled git2 features to ensure security validations are maintained; and (3) monitoring for new vulnerabilities in the relatively small dependency tree using cargo audit. The codebase follows good practices by using Cargo.lock and avoiding obvious hardcoded secrets. No critical vulnerabilities were identified.

  • Medium · Outdated regex dependency — Cargo.toml - dependencies section (regex = "1.10"). The codebase uses regex 1.10, which may contain known vulnerabilities. While this is not a critical issue for a terminal text editor with local file operations, regex vulnerabilities could potentially be exploited through malicious file content or syntax definitions. Fix: Regularly update regex to the latest stable version. Run cargo audit to check for known vulnerabilities in all dependencies.
  • Medium · Disabled security features in git2 dependency — Cargo.toml - [dependencies.git2]. The git2 dependency explicitly disables default features to avoid the openssl dependency. While this reduces the attack surface by avoiding openssl, it may also disable important security validations for git operations. The rationale suggests this was done for convenience rather than security review. Fix: Document why default features were disabled and review which security-related features are now missing. Consider re-enabling features individually if they provide important security guarantees. Ensure git operations still validate signatures and certificates appropriately.
  • Low · No dependency pinning in Cargo.toml — Cargo.toml - all dependencies. Dependencies use caret versioning (^1.0) which allows for minor and patch updates. While this enables security patches, it also means untested minor versions could introduce subtle bugs or incompatibilities. Fix: Consider using Cargo.lock file effectively by committing it to version control (already done based on file structure). Regularly run cargo update in controlled environments and test before deploying.
  • Low · Use of lazy_static without clear initialization safety — Cargo.toml - dependencies: lazy_static. The codebase uses lazy_static (1.4) for global initialization. While lazy_static is safe, it should be reviewed to ensure no race conditions or unsafe blocks are present in initialization code. Fix: Review all uses of lazy_static in the codebase for potential race conditions. Consider migrating to once_cell or std::sync::OnceLock for newer Rust versions (1.70+).

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Mixed signals · jmacdonald/amp — RepoPilot