abstractcode 0.1.0__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {abstractcode-0.1.0 → abstractcode-0.2.0}/PKG-INFO +51 -5
- abstractcode-0.2.0/README.md +125 -0
- abstractcode-0.2.0/abstractcode/__init__.py +23 -0
- abstractcode-0.2.0/abstractcode/cli.py +110 -0
- abstractcode-0.2.0/abstractcode/fullscreen_ui.py +656 -0
- abstractcode-0.2.0/abstractcode/input_handler.py +81 -0
- abstractcode-0.2.0/abstractcode/react_shell.py +1204 -0
- {abstractcode-0.1.0 → abstractcode-0.2.0}/abstractcode.egg-info/PKG-INFO +51 -5
- {abstractcode-0.1.0 → abstractcode-0.2.0}/abstractcode.egg-info/SOURCES.txt +4 -0
- {abstractcode-0.1.0 → abstractcode-0.2.0}/abstractcode.egg-info/requires.txt +1 -0
- {abstractcode-0.1.0 → abstractcode-0.2.0}/pyproject.toml +4 -2
- abstractcode-0.1.0/README.md +0 -80
- abstractcode-0.1.0/abstractcode/__init__.py +0 -54
- {abstractcode-0.1.0 → abstractcode-0.2.0}/LICENSE +0 -0
- {abstractcode-0.1.0 → abstractcode-0.2.0}/abstractcode.egg-info/dependency_links.txt +0 -0
- {abstractcode-0.1.0 → abstractcode-0.2.0}/abstractcode.egg-info/entry_points.txt +0 -0
- {abstractcode-0.1.0 → abstractcode-0.2.0}/abstractcode.egg-info/top_level.txt +0 -0
- {abstractcode-0.1.0 → abstractcode-0.2.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: abstractcode
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: A clean terminal CLI for multi-agent agentic coding
|
|
5
5
|
Author-email: Laurent-Philippe Albou <contact@abstractcore.ai>
|
|
6
6
|
Maintainer-email: Laurent-Philippe Albou <contact@abstractcore.ai>
|
|
@@ -25,6 +25,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
25
25
|
Requires-Python: >=3.8
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
License-File: LICENSE
|
|
28
|
+
Requires-Dist: prompt_toolkit>=3.0.0
|
|
28
29
|
Provides-Extra: dev
|
|
29
30
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
30
31
|
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
@@ -41,13 +42,15 @@ Dynamic: license-file
|
|
|
41
42
|
|
|
42
43
|
---
|
|
43
44
|
|
|
44
|
-
##
|
|
45
|
+
## Status
|
|
45
46
|
|
|
46
|
-
AbstractCode is
|
|
47
|
+
AbstractCode is under active development. A minimal interactive shell exists to support manual testing of AbstractAgent workflows.
|
|
48
|
+
|
|
49
|
+
Note: the PyPI release may lag behind the monorepo. For the latest development version, install from source.
|
|
47
50
|
|
|
48
51
|
## What is AbstractCode?
|
|
49
52
|
|
|
50
|
-
AbstractCode is a clean terminal CLI for multi-agent agentic coding, similar to Claude Code, Codex, and Gemini CLI. It leverages the Abstract Framework ecosystem to provide seamless AI-powered coding assistance directly in your terminal.
|
|
53
|
+
AbstractCode is a clean terminal CLI for multi-agent agentic coding, similar to Claude Code, Codex, and Gemini CLI. It leverages the powerful Abstract Framework ecosystem to provide seamless AI-powered coding assistance directly in your terminal.
|
|
51
54
|
|
|
52
55
|
## The Abstract Framework
|
|
53
56
|
|
|
@@ -75,7 +78,34 @@ pip install abstractcode
|
|
|
75
78
|
## Quick Start
|
|
76
79
|
|
|
77
80
|
```bash
|
|
78
|
-
#
|
|
81
|
+
# Show options
|
|
82
|
+
abstractcode --help
|
|
83
|
+
|
|
84
|
+
# Durable resume is enabled by default (state file: ~/.abstractcode/state.json)
|
|
85
|
+
# Override with:
|
|
86
|
+
ABSTRACTCODE_STATE_FILE=.abstractcode.state.json abstractcode
|
|
87
|
+
|
|
88
|
+
# Or disable persistence (in-memory only; cannot resume after quitting)
|
|
89
|
+
abstractcode --no-state
|
|
90
|
+
|
|
91
|
+
# Auto-approve tool calls (unsafe; bypasses interactive approvals)
|
|
92
|
+
abstractcode --auto-approve
|
|
93
|
+
|
|
94
|
+
# Limit agent iterations per task (default: 20)
|
|
95
|
+
abstractcode --max-iterations 25
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Notes:
|
|
99
|
+
- Run resume state is stored next to the state file in `*.d/`.
|
|
100
|
+
- Conversation history is stored in the run state (`RunState.vars["context"]["messages"]`) inside `*.d/`, and AbstractCode keeps the state file pointing at the most recent run so restarts can reload context.
|
|
101
|
+
- In the interactive shell, commands are slash-prefixed (e.g. `/help`, `/status`, `/history`, `/task ...`).
|
|
102
|
+
|
|
103
|
+
## Development (Monorepo)
|
|
104
|
+
|
|
105
|
+
From the monorepo root:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pip install -e ./abstractcore -e ./abstractruntime -e ./abstractagent -e ./abstractcode
|
|
79
109
|
abstractcode --help
|
|
80
110
|
```
|
|
81
111
|
|
|
@@ -112,3 +142,19 @@ MIT License - see LICENSE file for details.
|
|
|
112
142
|
|
|
113
143
|
**AbstractCode** - Multi-agent agentic coding in your terminal, powered by the Abstract Framework.
|
|
114
144
|
|
|
145
|
+
## Default Tools
|
|
146
|
+
|
|
147
|
+
AbstractCode provides a curated set of 8 tools for coding tasks:
|
|
148
|
+
|
|
149
|
+
| Tool | Description |
|
|
150
|
+
|------|-------------|
|
|
151
|
+
| `list_files` | Find and list files using glob patterns (case-insensitive) |
|
|
152
|
+
| `search_files` | Search for text patterns inside files using regex |
|
|
153
|
+
| `read_file` | Read file contents with optional line range |
|
|
154
|
+
| `write_file` | Write content to files, creating directories as needed |
|
|
155
|
+
| `edit_file` | Edit files by replacing text patterns (supports regex, line ranges, preview mode) |
|
|
156
|
+
| `execute_command` | Execute shell commands with security controls |
|
|
157
|
+
| `web_search` | Search the web via DuckDuckGo (no API key required) |
|
|
158
|
+
| `self_improve` | Log improvement suggestions for later review |
|
|
159
|
+
|
|
160
|
+
Additional tools are available via AbstractAgent for specialized use cases (execute_python, fetch_url).
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# AbstractCode
|
|
2
|
+
|
|
3
|
+
**A clean terminal CLI for multi-agent agentic coding**
|
|
4
|
+
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://www.python.org/downloads/)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Status
|
|
11
|
+
|
|
12
|
+
AbstractCode is under active development. A minimal interactive shell exists to support manual testing of AbstractAgent workflows.
|
|
13
|
+
|
|
14
|
+
Note: the PyPI release may lag behind the monorepo. For the latest development version, install from source.
|
|
15
|
+
|
|
16
|
+
## What is AbstractCode?
|
|
17
|
+
|
|
18
|
+
AbstractCode is a clean terminal CLI for multi-agent agentic coding, similar to Claude Code, Codex, and Gemini CLI. It leverages the powerful Abstract Framework ecosystem to provide seamless AI-powered coding assistance directly in your terminal.
|
|
19
|
+
|
|
20
|
+
## The Abstract Framework
|
|
21
|
+
|
|
22
|
+
AbstractCode is built on top of the Abstract Framework, a comprehensive suite of tools for AI-powered development:
|
|
23
|
+
|
|
24
|
+
- **[AbstractCore](https://github.com/lpalbou/abstractcore)** - Unified interface for multiple LLM providers
|
|
25
|
+
- **[AbstractRuntime](https://github.com/lpalbou/abstractruntime)** - Runtime environment for AI agents
|
|
26
|
+
- **[AbstractAgent](https://github.com/lpalbou/abstractagent)** - Multi-agent orchestration and coordination
|
|
27
|
+
|
|
28
|
+
## Features (Coming Soon)
|
|
29
|
+
|
|
30
|
+
- 🤖 **Multi-Agent Coding** - Coordinate multiple AI agents for complex coding tasks
|
|
31
|
+
- 🔌 **Provider Agnostic** - Works with OpenAI, Anthropic, Ollama, and more
|
|
32
|
+
- 💻 **Terminal Native** - Clean CLI interface for seamless workflow integration
|
|
33
|
+
- 🎯 **Context Aware** - Understands your codebase and project structure
|
|
34
|
+
- 🔄 **Iterative Development** - Collaborative coding with AI assistance
|
|
35
|
+
- 🌐 **Offline Capable** - Works with local models via Ollama
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install abstractcode
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Show options
|
|
47
|
+
abstractcode --help
|
|
48
|
+
|
|
49
|
+
# Durable resume is enabled by default (state file: ~/.abstractcode/state.json)
|
|
50
|
+
# Override with:
|
|
51
|
+
ABSTRACTCODE_STATE_FILE=.abstractcode.state.json abstractcode
|
|
52
|
+
|
|
53
|
+
# Or disable persistence (in-memory only; cannot resume after quitting)
|
|
54
|
+
abstractcode --no-state
|
|
55
|
+
|
|
56
|
+
# Auto-approve tool calls (unsafe; bypasses interactive approvals)
|
|
57
|
+
abstractcode --auto-approve
|
|
58
|
+
|
|
59
|
+
# Limit agent iterations per task (default: 20)
|
|
60
|
+
abstractcode --max-iterations 25
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Notes:
|
|
64
|
+
- Run resume state is stored next to the state file in `*.d/`.
|
|
65
|
+
- Conversation history is stored in the run state (`RunState.vars["context"]["messages"]`) inside `*.d/`, and AbstractCode keeps the state file pointing at the most recent run so restarts can reload context.
|
|
66
|
+
- In the interactive shell, commands are slash-prefixed (e.g. `/help`, `/status`, `/history`, `/task ...`).
|
|
67
|
+
|
|
68
|
+
## Development (Monorepo)
|
|
69
|
+
|
|
70
|
+
From the monorepo root:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install -e ./abstractcore -e ./abstractruntime -e ./abstractagent -e ./abstractcode
|
|
74
|
+
abstractcode --help
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Requirements
|
|
78
|
+
|
|
79
|
+
- Python 3.8 or higher
|
|
80
|
+
- AbstractCore
|
|
81
|
+
- AbstractRuntime
|
|
82
|
+
- AbstractAgent
|
|
83
|
+
|
|
84
|
+
## Documentation
|
|
85
|
+
|
|
86
|
+
Full documentation will be available at [abstractcore.ai](https://abstractcore.ai)
|
|
87
|
+
|
|
88
|
+
## Development Status
|
|
89
|
+
|
|
90
|
+
This project is in early development. Stay tuned for updates!
|
|
91
|
+
|
|
92
|
+
## Contributing
|
|
93
|
+
|
|
94
|
+
Contributions are welcome! Please check back soon for contribution guidelines.
|
|
95
|
+
|
|
96
|
+
## Contact
|
|
97
|
+
|
|
98
|
+
**Maintainer:** Laurent-Philippe Albou
|
|
99
|
+
📧 Email: contact@abstractcore.ai
|
|
100
|
+
🌐 Website: [abstractcore.ai](https://abstractcore.ai)
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
MIT License - see LICENSE file for details.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
**AbstractCode** - Multi-agent agentic coding in your terminal, powered by the Abstract Framework.
|
|
109
|
+
|
|
110
|
+
## Default Tools
|
|
111
|
+
|
|
112
|
+
AbstractCode provides a curated set of 8 tools for coding tasks:
|
|
113
|
+
|
|
114
|
+
| Tool | Description |
|
|
115
|
+
|------|-------------|
|
|
116
|
+
| `list_files` | Find and list files using glob patterns (case-insensitive) |
|
|
117
|
+
| `search_files` | Search for text patterns inside files using regex |
|
|
118
|
+
| `read_file` | Read file contents with optional line range |
|
|
119
|
+
| `write_file` | Write content to files, creating directories as needed |
|
|
120
|
+
| `edit_file` | Edit files by replacing text patterns (supports regex, line ranges, preview mode) |
|
|
121
|
+
| `execute_command` | Execute shell commands with security controls |
|
|
122
|
+
| `web_search` | Search the web via DuckDuckGo (no API key required) |
|
|
123
|
+
| `self_improve` | Log improvement suggestions for later review |
|
|
124
|
+
|
|
125
|
+
Additional tools are available via AbstractAgent for specialized use cases (execute_python, fetch_url).
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
AbstractCode - A clean terminal CLI for multi-agent agentic coding
|
|
3
|
+
|
|
4
|
+
This package provides a terminal-based interface for AI-powered coding assistance
|
|
5
|
+
using multiple coordinated agents. Built on the Abstract Framework ecosystem.
|
|
6
|
+
|
|
7
|
+
Author: Laurent-Philippe Albou
|
|
8
|
+
Email: contact@abstractcore.ai
|
|
9
|
+
Website: https://abstractcore.ai
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
__version__ = "0.2.0"
|
|
13
|
+
__author__ = "Laurent-Philippe Albou"
|
|
14
|
+
__email__ = "contact@abstractcore.ai"
|
|
15
|
+
__license__ = "MIT"
|
|
16
|
+
|
|
17
|
+
def main(argv=None):
|
|
18
|
+
"""Console entrypoint for `abstractcode`."""
|
|
19
|
+
from .cli import main as _main
|
|
20
|
+
|
|
21
|
+
return _main(argv)
|
|
22
|
+
|
|
23
|
+
__all__ = ["__version__", "__author__", "__email__", "__license__", "main"]
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import os
|
|
5
|
+
import sys
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import Optional, Sequence
|
|
8
|
+
|
|
9
|
+
from .react_shell import ReactShell
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _default_state_file() -> str:
|
|
13
|
+
env = os.getenv("ABSTRACTCODE_STATE_FILE")
|
|
14
|
+
if env:
|
|
15
|
+
return env
|
|
16
|
+
return str(Path.home() / ".abstractcode" / "state.json")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def _default_max_iterations() -> int:
|
|
20
|
+
env = os.getenv("ABSTRACTCODE_MAX_ITERATIONS")
|
|
21
|
+
if env:
|
|
22
|
+
try:
|
|
23
|
+
value = int(env)
|
|
24
|
+
except ValueError:
|
|
25
|
+
raise SystemExit("ABSTRACTCODE_MAX_ITERATIONS must be an integer.")
|
|
26
|
+
if value < 1:
|
|
27
|
+
raise SystemExit("ABSTRACTCODE_MAX_ITERATIONS must be >= 1.")
|
|
28
|
+
return value
|
|
29
|
+
return 25
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _default_max_tokens() -> Optional[int]:
|
|
33
|
+
env = os.getenv("ABSTRACTCODE_MAX_TOKENS")
|
|
34
|
+
if env:
|
|
35
|
+
try:
|
|
36
|
+
value = int(env)
|
|
37
|
+
except ValueError:
|
|
38
|
+
raise SystemExit("ABSTRACTCODE_MAX_TOKENS must be an integer.")
|
|
39
|
+
if value < 1024:
|
|
40
|
+
raise SystemExit("ABSTRACTCODE_MAX_TOKENS must be >= 1024.")
|
|
41
|
+
return value
|
|
42
|
+
return 32768 # Default 32k context
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
46
|
+
parser = argparse.ArgumentParser(
|
|
47
|
+
prog="abstractcode",
|
|
48
|
+
description="AbstractCode: an interactive terminal shell for AbstractFramework agents (MVP).",
|
|
49
|
+
)
|
|
50
|
+
parser.add_argument(
|
|
51
|
+
"--agent",
|
|
52
|
+
choices=("react", "codeact"),
|
|
53
|
+
default=os.getenv("ABSTRACTCODE_AGENT", "react"),
|
|
54
|
+
help="Agent type to run (react|codeact).",
|
|
55
|
+
)
|
|
56
|
+
parser.add_argument("--provider", default="ollama", help="LLM provider (e.g. ollama, openai)")
|
|
57
|
+
parser.add_argument("--model", default="qwen3:1.7b-q4_K_M", help="Model name")
|
|
58
|
+
parser.add_argument(
|
|
59
|
+
"--state-file",
|
|
60
|
+
default=_default_state_file(),
|
|
61
|
+
help="Path to save the current run reference (enables durable file-backed stores).",
|
|
62
|
+
)
|
|
63
|
+
parser.add_argument(
|
|
64
|
+
"--no-state",
|
|
65
|
+
action="store_true",
|
|
66
|
+
help="Disable persistence (keeps run state in memory; cannot resume after quitting).",
|
|
67
|
+
)
|
|
68
|
+
parser.add_argument(
|
|
69
|
+
"--auto-approve",
|
|
70
|
+
"--auto-accept",
|
|
71
|
+
action="store_true",
|
|
72
|
+
dest="auto_approve",
|
|
73
|
+
help="Automatically approve tool calls (unsafe; disables interactive approvals).",
|
|
74
|
+
)
|
|
75
|
+
parser.add_argument(
|
|
76
|
+
"--max-iterations",
|
|
77
|
+
type=int,
|
|
78
|
+
default=_default_max_iterations(),
|
|
79
|
+
help="Maximum ReAct reasoning iterations per task (default: 25).",
|
|
80
|
+
)
|
|
81
|
+
parser.add_argument(
|
|
82
|
+
"--max-tokens",
|
|
83
|
+
type=int,
|
|
84
|
+
default=_default_max_tokens(),
|
|
85
|
+
help="Maximum context tokens for LLM calls (default: 32768).",
|
|
86
|
+
)
|
|
87
|
+
parser.add_argument("--no-color", action="store_true", help="Disable ANSI colors")
|
|
88
|
+
return parser
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def main(argv: Optional[Sequence[str]] = None) -> int:
|
|
92
|
+
args = build_parser().parse_args(list(argv) if argv is not None else None)
|
|
93
|
+
state_file = None if args.no_state else args.state_file
|
|
94
|
+
|
|
95
|
+
shell = ReactShell(
|
|
96
|
+
agent=str(args.agent),
|
|
97
|
+
provider=args.provider,
|
|
98
|
+
model=args.model,
|
|
99
|
+
state_file=state_file,
|
|
100
|
+
auto_approve=bool(args.auto_approve),
|
|
101
|
+
max_iterations=int(args.max_iterations),
|
|
102
|
+
max_tokens=args.max_tokens,
|
|
103
|
+
color=not bool(args.no_color),
|
|
104
|
+
)
|
|
105
|
+
shell.run()
|
|
106
|
+
return 0
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
if __name__ == "__main__":
|
|
110
|
+
raise SystemExit(main(sys.argv[1:]))
|