Skip to content

Commit f9d0ccb

Browse files
James Zhujzhu
authored andcommitted
Adding more features
1 parent 2e7de03 commit f9d0ccb

578 files changed

Lines changed: 134603 additions & 1076 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.local.json

Lines changed: 72 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,77 @@
11
{
22
"permissions": {
33
"allow": [
4-
"Bash(python3 -m pyflakes:*)",
5-
"Bash(bash -lc:*)"
4+
"Bash(code-assistant-manager mcp claude list:*)",
5+
"Bash(code-assistant-manager mcp codex list:*)",
6+
"Bash(code-assistant-manager mcp droid list:*)",
7+
"Bash(code-assistant-manager mcp server list:*)",
8+
"Bash(code-assistant-manager mcp server search memory:*)",
9+
"Bash(code-assistant-manager mcp server info memory:*)",
10+
"Bash(code-assistant-manager mcp:*)",
11+
"Bash(python3:*)",
12+
"Read(//home/jzhu/**)",
13+
"Bash(python -m code_assistant_manager.mcp.server_commands:*)",
14+
"Bash(python -m code_assistant_manager:*)",
15+
"Bash(cat:*)",
16+
"Bash(python:*)",
17+
"Bash(fuck-u-code:*)",
18+
"Bash(./tests/test_mcp_memory.sh)",
19+
"Bash(find:*)",
20+
"Bash(pip install:*)",
21+
"Bash(cam:*)",
22+
"Bash(code-assistant-manager:*)",
23+
"Bash(timeout:*)",
24+
"Bash(chmod:*)",
25+
"Bash(source:*)",
26+
"Bash(pytest:*)",
27+
"mcp__memory__create_entities",
28+
"mcp__memory__read_graph",
29+
"mcp__memory__create_relations",
30+
"mcp__memory__search_nodes",
31+
"Bash(ag:*)",
32+
"WebSearch",
33+
"WebFetch(domain:github.com)",
34+
"WebFetch(domain:raw.githubusercontent.com)",
35+
"mcp__microsoft-learn__microsoft_docs_search",
36+
"Read(//tmp/**)",
37+
"mcp__microsoft-learn__microsoft_docs_fetch",
38+
"mcp__serena__list_dir",
39+
"mcp__serena__onboarding",
40+
"mcp__serena__read_file",
41+
"mcp__serena__search_for_pattern",
42+
"mcp__serena__get_symbols_overview",
43+
"mcp__serena__find_symbol",
44+
"mcp__serena__find_file",
45+
"mcp__serena__execute_shell_command",
46+
"mcp__serena__activate_project",
47+
"mcp__serena__replace_regex",
48+
"mcp__serena__create_text_file",
49+
"mcp__wikipedia-mcp__search_wikipedia",
50+
"mcp__serena__check_onboarding_performed",
51+
"Bash(flake8:*)",
52+
"Bash(mypy:*)",
53+
"Bash(pre-commit install:*)",
54+
"Bash(black:*)",
55+
"Bash(pre-commit:*)",
56+
"Bash(git push:*)",
57+
"WebFetch(domain:en.wikipedia.org)",
58+
"WebFetch(domain:news.blizzard.com)",
59+
"WebFetch(domain:www.pcgamer.com)",
60+
"Bash(make test)",
61+
"Bash(make:*)",
62+
"Bash(./install.sh:*)",
63+
"Bash(script --help:*)",
64+
"Bash(git add:*)",
65+
"Bash(git commit:*)"
666
],
7-
"deny": [],
8-
"ask": []
9-
}
67+
"additionalDirectories": [
68+
"/home/jzhu/projects/repos/mcpm.sh",
69+
"/home/jzhu/mcpm.sh"
70+
]
71+
},
72+
"enableAllProjectMcpServers": true,
73+
"enabledMcpjsonServers": [
74+
"serena"
75+
],
76+
"outputStyle": "Explanatory"
1077
}

.env.example

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
1-
# Example environment variables for ai-toolboxx
1+
# Example environment variables for code-assistant-manager
22
# Copy this file to .env and fill in your secrets. Do NOT commit .env with real keys.
33
# Example:
44
# API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxx
55

66
# API key used by endpoints' list_models commands
77
# You can provide per-endpoint keys. If a per-endpoint key is set it will be used;
88
# otherwise `API_KEY` will be used as a fallback.
9-
API_KEY=
9+
# API_KEY=
1010

1111
# Per-endpoint API keys (optional)
12-
API_KEY_LITELLM=
13-
API_KEY_COPILOT=
12+
API_KEY_LITELLM=sk-***
13+
API_KEY_COPILOT=sk-***
14+
15+
GITHUB_TOKEN=ghu_c***
16+
17+
# gemini api key auth
18+
GEMINI_API_KEY=AI***
19+
20+
# vertex api auth
21+
GOOGLE_APPLICATION_CREDENTIALS=~/.config/gcloud/*****
22+
GOOGLE_CLOUD_PROJECT=****
23+
GOOGLE_CLOUD_LOCATION=global
24+
GOOGLE_GENAI_USE_VERTEXAI="true"

.flake8

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
[flake8]
2+
# Flake8 configuration for code-assistant-manager
3+
4+
# Compatibility with Black
5+
max-line-length = 88
6+
extend-ignore = E203, W503, E501
7+
8+
# Exclude patterns
9+
exclude =
10+
.git,
11+
__pycache__,
12+
.venv,
13+
venv,
14+
env,
15+
.eggs,
16+
*.egg,
17+
build,
18+
dist,
19+
.tox,
20+
.mypy_cache,
21+
.pytest_cache,
22+
node_modules,
23+
*.egg-info
24+
25+
# Complexity
26+
max-complexity = 15
27+
28+
# McCabe complexity
29+
# Default is 10, we allow slightly more for complex CLI logic
30+
per-file-ignores =
31+
__init__.py:F401,F403
32+
cli.py:C901
33+
tools/base.py:C901,B950,B907
34+
code_assistant_manager/cli/commands.py:C901,F401,F811,B950,B110
35+
code_assistant_manager/cli/doctor.py:C901,B950
36+
code_assistant_manager/cli/upgrade.py:C901,F401,F811,B950
37+
code_assistant_manager/cli/utils.py:F401,C901
38+
code_assistant_manager/mcp/server_commands.py:B008,B950,E731,C901,F541,B907
39+
code_assistant_manager/tools/__init__.py:B950
40+
code_assistant_manager/tools/codebuddy.py:B950
41+
code_assistant_manager/tools/crush.py:B950,B907
42+
code_assistant_manager/tools/droid.py:B950,B907
43+
code_assistant_manager/upgrades/npm_upgrade.py:B950,B907
44+
code_assistant_manager/upgrades/shell_upgrade.py:B950,B907
45+
tests/test_cli.py:F401,F811,F841,B908
46+
tests/test_filtering.py:F401,F841
47+
tests/test_ui.py:F401
48+
tests/test_ui_key_provider.py:F401
49+
tests/test_ui_numeric_fallback.py:F401
50+
tests/test_ui_pexpect_integration.py:F401
51+
tests/test_upgrade_functionality.py:F401,B950
52+
53+
# Plugins configuration
54+
# flake8-bugbear, flake8-comprehensions, flake8-simplify
55+
select = C,E,F,W,B,B9

.github/copilot-instructions.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# CLAUDE.md — Repository guidelines for AI-assisted edits
2+
3+
This file documents repository-level expectations and instructions intended to guide contributors and AI-assisted editing tools (like Claude Code) when making changes in this project.
4+
5+
- Ask for approval before any git commit and push
6+
- Always run tests before completing all development of new changes
7+
- Always test the CLI usages
8+
- After any changes, run the folling to reinstall the project:
9+
```
10+
rm -rf dist/*
11+
./install.sh uninstall
12+
./install.sh
13+
cp ~/.config/code-assistant-manager/settings.json.bak ~/.config/code-assistant-manager/settings.json
14+
```

.github/workflows/pylint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Pylint
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.8", "3.9", "3.10"]
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v3
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install pylint
21+
- name: Analysing the code with pylint
22+
run: |
23+
pylint $(git ls-files '*.py')

.gitignore

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,17 @@
22
.env.local
33
# token files
44
*token*
5-
.serena
6-
endpoints.conf
5+
.qwen
6+
settings.conf
7+
test_*.sh
8+
*_test.sh
9+
*__pycache__*
10+
.serena/
11+
build
12+
*egg-info*
13+
.neovate
14+
*.log
15+
dist
16+
.crush/
17+
.mcp.json
18+
.venv

.neovate/config.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"mcpServers": {
3+
"context7": {
4+
"type": "stdio",
5+
"command": "npx",
6+
"args": []
7+
},
8+
"memory": {
9+
"type": "stdio",
10+
"command": "npx",
11+
"args": []
12+
},
13+
"sequential-thinking": {
14+
"type": "stdio",
15+
"command": "npx",
16+
"args": []
17+
},
18+
"serena": {
19+
"type": "stdio",
20+
"command": "uvx",
21+
"args": [
22+
"serena",
23+
"start-mcp-server"
24+
]
25+
}
26+
}
27+
}

.pre-commit-config.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
repos:
2+
# Standard pre-commit hooks
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.5.0
5+
hooks:
6+
- id: trailing-whitespace
7+
exclude: '\.patch$'
8+
- id: end-of-file-fixer
9+
exclude: '\.patch$'
10+
- id: check-yaml
11+
- id: check-json
12+
- id: check-added-large-files
13+
args: ['--maxkb=1000']
14+
- id: check-case-conflict
15+
- id: check-merge-conflict
16+
- id: check-toml
17+
- id: debug-statements
18+
- id: mixed-line-ending
19+
args: ['--fix=lf']
20+
21+
# Python code formatting
22+
- repo: https://github.com/psf/black
23+
rev: 24.3.0
24+
hooks:
25+
- id: black
26+
language_version: python3
27+
args: ['--config=pyproject.toml']
28+
29+
# Import sorting
30+
- repo: https://github.com/pycqa/isort
31+
rev: 5.13.2
32+
hooks:
33+
- id: isort
34+
args: ['--profile=black', '--line-length=88']
35+
36+
# Linting
37+
- repo: https://github.com/pycqa/flake8
38+
rev: 7.1.2
39+
hooks:
40+
- id: flake8
41+
args: ['--config=.flake8']
42+
additional_dependencies: [
43+
'flake8-bugbear',
44+
'flake8-comprehensions',
45+
'flake8-simplify',
46+
]
47+
48+
# Type checking
49+
- repo: https://github.com/pre-commit/mirrors-mypy
50+
rev: v1.11.0
51+
hooks:
52+
- id: mypy
53+
args: ['--config-file=pyproject.toml']
54+
additional_dependencies: [
55+
'types-PyYAML',
56+
'types-requests',
57+
'pydantic>=2.6.0',
58+
'typer>=0.12.0',
59+
]
60+
exclude: '^tests/'
61+
62+
# Security checks
63+
- repo: https://github.com/PyCQA/bandit
64+
rev: 1.7.8
65+
hooks:
66+
- id: bandit
67+
args: ['-c', 'pyproject.toml']
68+
additional_dependencies: ['bandit[toml]']
69+
exclude: '^tests/'
70+
71+
# Docstring coverage
72+
- repo: https://github.com/econchick/interrogate
73+
rev: 1.7.0
74+
hooks:
75+
- id: interrogate
76+
args: ['--config=pyproject.toml']
77+
pass_filenames: false

CLAUDE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# CLAUDE.md — Repository guidelines for AI-assisted edits
2+
3+
This file documents repository-level expectations and instructions intended to guide contributors and AI-assisted editing tools (like Claude Code) when making changes in this project.
4+
5+
- Ask for approval before any git commit and push
6+
- Always run tests before completing all development of new changes
7+
- Always test the CLI usages
8+
- After any changes, run the folling to reinstall the project:
9+
```
10+
rm -rf dist/*
11+
./install.sh uninstall
12+
./install.sh
13+
cp ~/.config/code-assistant-manager/settings.json.bak ~/.config/code-assistant-manager/settings.json
14+
```

0 commit comments

Comments
 (0)