Skip to content

takeokunn/paredit-cli

Repository files navigation

paredit-cli

CI License: MIT

paredit is a structure-aware CLI for inspecting and safely refactoring Lisp S-expressions. Its canonical command layout is designed for both people and AI coding agents:

  • paredit inspect ... reads source and produces reports.
  • paredit edit ... transforms one selected form; stdout by default, --write to update the file in place, --diff to preview a unified diff.
  • paredit refactor ... plans, previews, verifies, and applies semantic changes.

Commands

paredit inspect <report> [args]    # read-only inventory, validation, analysis
paredit edit <transform> [args]    # one structural edit (stdout, --diff, or --write)
paredit refactor <workflow> [args] # plan, preview, verify, and apply changes
paredit completions <shell>        # shell completion scripts (bash/zsh/fish/...)

Run paredit --help, then paredit <namespace> --help for the complete command list. All source-facing commands live in these three namespaces; completions is the only meta command. For machine-readable discovery, run:

paredit inspect capabilities --output json  # full catalog of commands and flags

Quick Start

paredit inspect check --file src/example.lisp
paredit inspect outline --file src/example.lisp
paredit edit wrap --file src/example.lisp --path 0.2 --diff
paredit refactor plan --symbol old-name src/example.lisp

Start with the documentation source for command selection, safe workflows, and integration examples. The published site is available at https://takeokunn.github.io/paredit-cli/.

Install

nix run github:takeokunn/paredit-cli -- --help    # run without installing
nix profile install github:takeokunn/paredit-cli # install via Nix
cargo install --git https://github.com/takeokunn/paredit-cli --locked
nix develop -c cargo install --path . --locked   # from a local checkout

Prebuilt binaries are served from the public takeokunn-paredit-cli Cachix cache. The current minimum supported Rust version is 1.85. See the installation guide for the flake overlay and flake-input usage, including commit pinning for automation.

Development

nix develop
cargo test
nix flake check

Verify the declared MSRV locally before touching parser, refactor, packaging, or public API surfaces:

cargo +1.85 test --locked

Pull requests run nix flake check.

A typed Rust library API behind the CLI is available in the paredit_cli documentation and its source.

Community and security

  • Contributing: local setup, verification, and pull request expectations.
  • Code of Conduct: standards for project spaces.
  • Support: where to ask usage questions or report defects.
  • Security: private vulnerability reporting instructions.
  • Releasing: maintainer release verification and publication steps.

About

Structure-editing CLI for safe S-expression refactoring by AI coding agents

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages