MCPcopy Index your code
hub / github.com/ddddddeon/a

github.com/ddddddeon/a @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
15 symbols 30 edges 5 files 0 documented · 0% 9 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

a

CLI tool to generate code from ChatGPT that pretty-prints the output by language

tty

Installation

cargo install a-gpt

# or to enable clipboard functionality:
# cargo install a-gpt --features clipboard

export OPENAI_API_KEY=sk-WEz... # from https://platform.openai.com/account/api-keys

For local development:

make release
sudo make install

If the clipboard feature is enabled and you are running Ubuntu/Debian, you may need to install the following packages:

sudo apt install xorg-dev libxcb-composite0-dev xclip

Usage

You will need an OpenAI API key, and to set the environment variable OPENAI_API_KEY.

Invoke the a command followed by a prompt. If the first word in the prompt is a programming language or file-format the pretty-printer recognizes, it will syntax highlight the output.

a python script that fetches a url
a rust program that showcases its various features
a yaml manifest describing a kubernetes deployment

Invoking the command with no arguments will read from stdin, accepting input interactively or from a pipe. You can choose to include or not include the word "a" at the beginning your input string.

echo "python script that fetches a url" | a
echo "a python script that fetches a url" | a

If installed with the clipboard feature enabled, the output will be copied to the clipboard.

Core symbols most depended-on inside this repo

gather_args
called by 4
src/lib.rs
prompt
called by 2
src/lib.rs
pretty_print
called by 2
src/util.rs
lang_exists
called by 1
src/util.rs
copy_to_clipboard
called by 1
src/util.rs
prompt
called by 1
src/llm.rs
main
called by 0
src/main.rs
new
called by 0
src/llm.rs

Shape

Function 10
Class 3
Method 2

Languages

Rust100%

Modules by API surface

src/llm.rs5 symbols
tests/integration.rs4 symbols
src/util.rs3 symbols
src/lib.rs2 symbols
src/main.rs1 symbols

For agents

$ claude mcp add a \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact