A minimal coding agent harness in Nim.
- Nim >= 2.2.8
- Nimble
bashripgrepbrew install ripgrepor similar on your OS
-
Install dependencies:
nimble install
-
Create a
.envfile with your (Alibaba Model Studio Coding Plan) API key:API_KEY=your_api_key_here
(or put it in your
.bashrcetc viaexport GIRVENT_API_KEY=sk-etc..)
nimble buildln -s $PWD/girvent /usr/local/bin/girvent(or similar, up to you but if you want to use it outside of where you built it, this is needed)
Run the agent:
./girvent| Command | Description |
|---|---|
/help |
Show available commands |
/clear |
Clear conversation history |
/context |
Show token usage |
/model |
Show or switch model |
/quit |
Exit |
The agent has access to:
read_file- Read file contentswrite_file- Write to a fileedit_file- Replace a unique substring in a filegrep- Search file contents with a regex pattern using ripgreplist_directory- List directory contentsexec_bash- Run shell commands
You can create an optional AGENTS.md file in the current working directory to provide the agent with knowledge of CLI tools available on your system. If the file exists, its contents will be appended to the system prompt at startup.