GitHub - ProximalEnergy/whitman: agents.md swapper · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
ProximalEnergy
whitman
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>11 Commits<br>11 Commits
.github/workflows
.github/workflows
.whitman/agents
.whitman/agents
_scripts
_scripts
src
src
tests
tests
.gitignore
.gitignore
.mise.toml
.mise.toml
Cargo.lock
Cargo.lock
Cargo.toml
Cargo.toml
LICENSE
LICENSE
README.md
README.md
rust-toolchain.toml
rust-toolchain.toml
View all files
Repository files navigation
whitman
"""<br>Do I contradict myself?<br>Very well then I contradict myself,<br>(I am large, I contain multitudes.)<br>"""
whitman is an interactive Rust CLI for choosing a repository AGENTS.md profile<br>and linking it into the current project as ./AGENTS.md.
Profiles live in .whitman/agents where Whitman is initialized. When run from a<br>subdirectory, Whitman uses the nearest ancestor containing .whitman; otherwise<br>it uses the nearest Git repository root.
Install
From crates.io:
cargo install whitman
From this repository:
cargo install --path .
The crate is pinned to Rust 1.96.0 with rust-toolchain.toml.
Usage
Run whitman from the project directory that should receive AGENTS.md:
whitman
The terminal UI lists available profiles. Type to search by profile name or<br>description, use arrow keys to move, press Enter to select a profile, then<br>confirm the selection. Press + to create a new profile from inside the UI.
When creating a profile, whitman prompts for a profile name and description in<br>the terminal UI. It writes AGENTS..md and updates<br>.whitman/agents/descriptions.toml, then selects the new profile.
whitman intentionally has no non-interactive apply mode. The active profile is<br>always chosen by a person in the terminal UI.
Profile Files
Profiles are Markdown files named AGENTS..md under .whitman/agents.<br>The profile name is inferred from the file name, and the profile description is<br>stored in .whitman/agents/descriptions.toml.
Example:
.whitman/agents/descriptions.toml
default = "Default coding-agent instructions"
.whitman/agents/AGENTS.default.md
# Instructions
...
Profile rules:
File name format: AGENTS..md
Description file format: .whitman/agents/descriptions.toml
Description entry format: = ""
Name length: under 15 characters
Name characters: ASCII letters, numbers, underscores, and hyphens
Description source: the value for the profile name in the description file
Description length: under 100 characters
Safety Behavior
whitman always writes the destination ./AGENTS.md in the current directory.
When ./AGENTS.md does not exist, whitman creates a file symlink to the<br>selected profile.
When ./AGENTS.md is already a symlink into .whitman/agents, whitman<br>updates the symlink to point at the selected profile.
When ./AGENTS.md is a regular file, whitman converts it into<br>.whitman/agents/AGENTS.old.md and adds old = "Converted from AGENTS.md" to<br>.whitman/agents/descriptions.toml. It then replaces ./AGENTS.md with the<br>selected-profile symlink. If the old profile already exists, whitman asks<br>before overwriting it.
When ./AGENTS.md is a symlink outside .whitman/agents, whitman refuses to<br>overwrite it and prints an error.
Windows Symlinks
On Windows, whitman uses std::os::windows::fs::symlink_file to create a file<br>symlink. If Windows denies symlink creation, enable Developer Mode in<br>Settings > System > For developers, or run whitman from an Administrator<br>terminal.
whitman does not copy profile files as a fallback.
Development
cargo fmt --check<br>cargo clippy --all-targets --all-features -- -D warnings<br>cargo test
CI runs format, clippy, and tests on Linux, macOS, and Windows.
Publishing
The release targets are:
crates.io package: whitman
Homebrew formula: Formula/whitman.rb in your tap repository
mise registry shorthand: [tools.whitman] in the mise registry
Before the first crates.io publish, create a crates.io token and run:
cargo login
Before the first CI...