Skip to main content

AI-powered CLI agent with controlled, structured access to your codebase

Project description

๐Ÿค– asgu

AI-powered CLI agent that gives language models controlled, structured access to your codebase through simple YAML instruction files.

Version: v1.6 โ€” April 9, 2026


๐Ÿ˜ค The Problem with Existing AI Coding Agents

Most AI coding tools today share the same fundamental flaws:

  • ๐Ÿšซ No boundaries. The agent reads and modifies whatever it wants across your entire project. One wrong instruction and critical files get overwritten or deleted.
  • ๐ŸŽฒ No structure. You write a prompt in natural language, the AI guesses what files to touch, and you hope for the best.
  • ๐Ÿ‘ป No accountability. After the agent runs, you have no clear record of what changed, why, or what it noticed along the way.
  • ๐Ÿ’ธ Token waste. Feeding the entire codebase into context on every request is slow and expensive.
  • ๐Ÿ› Logical errors go unnoticed. If there's no console error, most agents won't catch that styles aren't applied or that an import is pointing at the wrong file.

Tools like Cursor, Copilot, and other agents are powerful โ€” but they operate with too much freedom and too little transparency for serious development workflows.


โœ… What asgu Does Differently

asgu introduces a YAML instruction file that you write before the agent runs. This file defines exactly what the agent can read, what it can write, what it must never touch, and what it needs to fix. The agent operates strictly within these boundaries.

You stay in control. The agent stays in its lane.


โš™๏ธ How It Works

  1. ๐Ÿ“ You create a .yaml instruction file in your project folder
  2. โ–ถ๏ธ You run asgu run <file.yaml> in the terminal
  3. ๐Ÿค– asgu reads your instruction, collects the relevant context, sends a structured prompt to the AI model, parses the response, and writes only the files you allowed
  4. ๐Ÿ“Š Optionally, it saves a report with what changed, tips from the model, and a backup of the original files

๐Ÿ› ๏ธ Stack

  • Language: Python
  • AI model: qwen2.5-coder:7b via Ollama (runs fully locally, no API key needed)
  • Libraries:
    • ollama โ€” local model inference
    • pyyaml โ€” YAML instruction parsing
    • pyinstaller โ€” builds the project into a standalone .exe

๐Ÿ“ฆ Installation

Requirements: Python 3.10+, Ollama installed and running

# Install dependencies
pip install ollama pyyaml

# Pull the model
ollama pull qwen2.5-coder:7b

# Clone the repo and build
git clone https://github.com/yourname/asgu
cd asgu
pyinstaller --onefile --hidden-import=ollama asgu.py

The asgu.exe will appear in the dist/ folder.


๐Ÿš€ Commands

asgu init

asgu init
asgu โ€” setup

Enter project path: C:/Users/user/projects/my-app
Project saved. Now run: asgu run <file.yaml>

The project path is saved to asgu.config.json next to the executable.


asgu run <file.yaml>

asgu run landing.yaml
asgu โ€” running landing.yaml

[1/4] Collecting context...
[2/4] Sending request to Ollama...
[3/4] Applying changes...
  [WRITTEN]  src/App.jsx
  [WRITTEN]  src/App.css
[4/4] Finalizing...
  [REPORT]   asgu_report.yaml

  [TIPS]
  > App.css should also be imported in src/main.jsx

asgu โ€” done (2 file(s) changed)

asgu undo

Rolls back changes to all files that were modified in the last run, using the backup saved in asgu_report.yaml.

asgu undo
asgu โ€” undo

  [RESTORED]  src/App.jsx
  [RESTORED]  src/App.css

asgu โ€” done (2 file(s) restored)

Requires backup: true in the instruction file used for the previous run.


asgu status

Shows the current project path and the last instruction that was run.

asgu status
asgu โ€” status

  Project:   C:/Users/user/projects/my-app
  Last run:  landing.yaml
  Changed:   src/App.jsx, src/App.css
  Backed up: yes

๐Ÿ“‹ YAML Instruction Syntax

Full example

task: "Create a landing page for a clothing store"

model: qwen2.5-coder:7b

access:
  read: true
  write:
    - src/App.jsx
    - src/App.css
  forbidden:
    - .env
    - src/main.jsx

reference:
  - references/example.css
  - references/layout.html

error: |
  TypeError: Cannot read properties of undefined at App.jsx:15
  Styles from App.css are not applied to the page.

instructions:
  - Create a hero section with a title, subtitle and a button
  - Create a products section with 3 product cards
  - Add a footer with contact info
  - Import App.css at the top of App.jsx

feedback: true
tips: true
backup: true

๐Ÿ”ง Parameters

Parameter Type Required Description
task string โœ… yes Short description of what the agent should do
model string โž– no Ollama model to use (default: qwen2.5-coder:7b)
access.read true / false / list โœ… yes Controls what the agent can read for context
access.write list โœ… yes Files the agent is allowed to modify or create
access.forbidden list โž– no Files the agent must never touch
reference list โž– no Paths to example files (HTML, CSS) used as style reference
error string โž– no Console error or description of a logical bug to fix
instructions list โœ… yes Step-by-step instructions for the agent
feedback boolean โž– no Save a report to asgu_report.yaml after the run
tips boolean โž– no Ask the model to report issues outside the write zone
backup boolean โž– no Save original file contents to the report before overwriting

๐Ÿ‘๏ธ access.read modes

# Read the entire project (excludes forbidden and .yaml files)
read: true

# Read nothing โ€” agent only sees the write files
read: false

# Read specific files only
read:
  - src/App.jsx
  - src/main.jsx

๐Ÿ› error โ€” console or logical errors

Paste any error directly:

error: |
  Module not found: Error: Can't resolve './App.css'
  at ./src/App.jsx

Or describe a logical issue:

error: |
  The button click does not trigger any action.
  The counter does not increment when clicked.

๐ŸŽจ reference โ€” example files

Point the agent to existing HTML or CSS files to use as a style reference:

reference:
  - references/old_design.css
  - references/example_layout.html

๐Ÿ’พ backup + asgu undo โ€” rollback support

When backup: true, the original contents of all write files are saved to asgu_report.yaml before any changes are made. If the result is wrong, run asgu undo to restore everything automatically.


๐Ÿ“Š Report format

When feedback: true, asgu writes asgu_report.yaml to your project folder:

task_completed: Create a landing page for a clothing store
changed_files:
  - src/App.jsx
  - src/App.css
tips:
  - App.css import is missing in src/main.jsx
backup:
  src/App.jsx: |
    // original file content before changes

๐Ÿšซ What the Agent Cannot Do

  • โŒ Delete files
  • โŒ Run shell commands (npm install, git, etc.)
  • โŒ Access files outside the project path
  • โŒ Write files not listed in access.write
  • โŒ Read files listed in access.forbidden

๐Ÿ—บ๏ธ Roadmap

โœ… v1.6 โ€” current

  • asgu init, run, undo, status
  • model parameter โ€” choose the model inside the YAML
  • error parameter โ€” pass a bug or console error directly
  • reference parameter โ€” example files for context
  • instructions as a list instead of a plain string
  • asgu undo โ€” one-command rollback from backup

๐Ÿ”œ v1.7 โ€” planned

  • asgu run a.yaml b.yaml โ€” run multiple instructions at once
  • asgu history โ€” view past runs
  • asgu validate <file.yaml> โ€” check YAML syntax before running
  • functions: sub-parameter for read, write, forbidden โ€” function-level access control inside a file

๐Ÿ“„ License

asgu Source Available License Copyright (c) 2026 Anasteyshen666

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated source code (the "Software"), to use, run, and study the Software for personal or commercial purposes, subject to the following conditions:

  1. ATTRIBUTION REQUIRED Any modified version of the Software that is publicly distributed must clearly state that it is based on asgu by Anasteyshen and include a link to the original repository. This notice must appear in the documentation, README, or any other prominent place in the modified work.

  2. NO SALE OF MODIFICATIONS WITHOUT PERMISSION You may not sell, sublicense, or otherwise commercially distribute any modified version of the Software without prior written permission from the author (Anasteyshen). Selling or monetizing the Software in its original, unmodified form is also not permitted without permission.

  3. WHAT YOU CAN DO (without asking)

    • Use the Software for any personal or commercial project
    • Read and study the source code
    • Share the original, unmodified Software with proper credit
    • Fork and modify the Software for private use
  4. WHAT REQUIRES PERMISSION

    • Publishing or distributing a modified version
    • Selling or monetizing any version of the Software
    • Using the name "asgu" or the author's name to promote a derived product

To request permission, contact: fangishanonim@gmail.com

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM THE USE OF THE SOFTWARE.

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iris_dev-1.8.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iris_dev-1.8.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file iris_dev-1.8.0.tar.gz.

File metadata

  • Download URL: iris_dev-1.8.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for iris_dev-1.8.0.tar.gz
Algorithm Hash digest
SHA256 4eca9baa556c1cbe49a79c2943f338f863967ba19219718a22ffe9f9a6d4a930
MD5 5efdab1267057ad2ed3ab971fa9c0690
BLAKE2b-256 fcc1046008ce9bfb1c8acafdcee9fc06de614af70989dc142415d79cc3874e69

See more details on using hashes here.

File details

Details for the file iris_dev-1.8.0-py3-none-any.whl.

File metadata

  • Download URL: iris_dev-1.8.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for iris_dev-1.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce6337d0a32a7540f2f50fbffecceb5850a1c5a529871140f824602466ffe324
MD5 599ccd990f57f514b8d926f0c7f76f8d
BLAKE2b-256 575d12019c0ecbf1dc759405ee5f13c7b206f8d75c0cb55bfb9628915e45c2f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page