lcode-cli 0.1.1__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.
Files changed (62) hide show
  1. lcode_cli-0.1.1/.editorconfig +15 -0
  2. lcode_cli-0.1.1/.github/CODEOWNERS +1 -0
  3. lcode_cli-0.1.1/.github/ISSUE_TEMPLATE/bug_report.yml +52 -0
  4. lcode_cli-0.1.1/.github/ISSUE_TEMPLATE/config.yml +11 -0
  5. lcode_cli-0.1.1/.github/ISSUE_TEMPLATE/feature_request.yml +27 -0
  6. lcode_cli-0.1.1/.github/ISSUE_TEMPLATE/model_request.yml +42 -0
  7. lcode_cli-0.1.1/.github/PULL_REQUEST_TEMPLATE.md +14 -0
  8. lcode_cli-0.1.1/.github/dependabot.yml +16 -0
  9. lcode_cli-0.1.1/.github/workflows/ci.yml +51 -0
  10. lcode_cli-0.1.1/.github/workflows/docs.yml +39 -0
  11. lcode_cli-0.1.1/.github/workflows/release.yml +36 -0
  12. lcode_cli-0.1.1/.gitignore +31 -0
  13. lcode_cli-0.1.1/.pre-commit-config.yaml +23 -0
  14. lcode_cli-0.1.1/AGENTS.md +41 -0
  15. lcode_cli-0.1.1/CHANGELOG.md +55 -0
  16. lcode_cli-0.1.1/CODE_OF_CONDUCT.md +131 -0
  17. lcode_cli-0.1.1/CONTRIBUTING.md +105 -0
  18. lcode_cli-0.1.1/LICENSE +22 -0
  19. lcode_cli-0.1.1/PKG-INFO +181 -0
  20. lcode_cli-0.1.1/README.md +148 -0
  21. lcode_cli-0.1.1/SECURITY.md +37 -0
  22. lcode_cli-0.1.1/docs/assets/demo.svg +241 -0
  23. lcode_cli-0.1.1/docs/assets/extra.css +29 -0
  24. lcode_cli-0.1.1/docs/assets/logo.svg +15 -0
  25. lcode_cli-0.1.1/docs/assets/social-preview.png +0 -0
  26. lcode_cli-0.1.1/docs/changelog.md +5 -0
  27. lcode_cli-0.1.1/docs/configuration.md +66 -0
  28. lcode_cli-0.1.1/docs/contributing.md +5 -0
  29. lcode_cli-0.1.1/docs/how-it-works.md +77 -0
  30. lcode_cli-0.1.1/docs/index.md +95 -0
  31. lcode_cli-0.1.1/docs/installation.md +145 -0
  32. lcode_cli-0.1.1/docs/models.md +184 -0
  33. lcode_cli-0.1.1/docs/quickstart.md +92 -0
  34. lcode_cli-0.1.1/docs/troubleshooting.md +95 -0
  35. lcode_cli-0.1.1/docs/usage.md +116 -0
  36. lcode_cli-0.1.1/install.sh +90 -0
  37. lcode_cli-0.1.1/mkdocs.yml +102 -0
  38. lcode_cli-0.1.1/overrides/main.html +20 -0
  39. lcode_cli-0.1.1/pyproject.toml +74 -0
  40. lcode_cli-0.1.1/scripts/record_demo.py +120 -0
  41. lcode_cli-0.1.1/scripts/social-preview.html +99 -0
  42. lcode_cli-0.1.1/src/lcode/__init__.py +3 -0
  43. lcode_cli-0.1.1/src/lcode/__main__.py +3 -0
  44. lcode_cli-0.1.1/src/lcode/agent.py +376 -0
  45. lcode_cli-0.1.1/src/lcode/catalog.py +114 -0
  46. lcode_cli-0.1.1/src/lcode/cli.py +437 -0
  47. lcode_cli-0.1.1/src/lcode/config.py +135 -0
  48. lcode_cli-0.1.1/src/lcode/hardware.py +84 -0
  49. lcode_cli-0.1.1/src/lcode/models.toml +128 -0
  50. lcode_cli-0.1.1/src/lcode/ollama.py +163 -0
  51. lcode_cli-0.1.1/src/lcode/permissions.py +90 -0
  52. lcode_cli-0.1.1/src/lcode/render.py +43 -0
  53. lcode_cli-0.1.1/src/lcode/repl.py +281 -0
  54. lcode_cli-0.1.1/src/lcode/tools.py +533 -0
  55. lcode_cli-0.1.1/tests/conftest.py +81 -0
  56. lcode_cli-0.1.1/tests/test_agent.py +118 -0
  57. lcode_cli-0.1.1/tests/test_catalog.py +62 -0
  58. lcode_cli-0.1.1/tests/test_cli.py +80 -0
  59. lcode_cli-0.1.1/tests/test_config.py +55 -0
  60. lcode_cli-0.1.1/tests/test_permissions.py +61 -0
  61. lcode_cli-0.1.1/tests/test_tools.py +124 -0
  62. lcode_cli-0.1.1/uv.lock +901 -0
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 4
10
+
11
+ [*.{yml,yaml,toml,json,md}]
12
+ indent_size = 2
13
+
14
+ [*.md]
15
+ trim_trailing_whitespace = false
@@ -0,0 +1 @@
1
+ * @nasser1941
@@ -0,0 +1,52 @@
1
+ name: Bug report
2
+ description: Something doesn't work as documented.
3
+ labels: [bug, triage]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thanks for reporting! Please check the [troubleshooting guide](https://nasser1941.github.io/lcode/troubleshooting/) first.
9
+ **Don't paste secrets, tokens or private code.**
10
+ - type: textarea
11
+ id: what-happened
12
+ attributes:
13
+ label: What happened?
14
+ description: What you did, what you expected, and what happened instead.
15
+ validations:
16
+ required: true
17
+ - type: textarea
18
+ id: reproduce
19
+ attributes:
20
+ label: Steps to reproduce
21
+ placeholder: |
22
+ 1. lcode --model qwen3.5-9b
23
+ 2. Ask "..."
24
+ 3. See error
25
+ validations:
26
+ required: true
27
+ - type: textarea
28
+ id: doctor
29
+ attributes:
30
+ label: Output of `lcode doctor`
31
+ description: Shows your lcode, Ollama and model versions and your hardware.
32
+ render: text
33
+ validations:
34
+ required: true
35
+ - type: dropdown
36
+ id: os
37
+ attributes:
38
+ label: Operating system
39
+ options:
40
+ - Ubuntu / Debian
41
+ - Other Linux
42
+ - macOS (Apple Silicon)
43
+ - Windows (WSL2)
44
+ - Other
45
+ validations:
46
+ required: true
47
+ - type: textarea
48
+ id: logs
49
+ attributes:
50
+ label: Relevant output or logs
51
+ description: Terminal output, or Ollama server logs (`journalctl -u ollama` on Linux, `~/.ollama/logs/server.log` on macOS).
52
+ render: text
@@ -0,0 +1,11 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://nasser1941.github.io/lcode/
5
+ about: Installation, models, configuration and troubleshooting.
6
+ - name: Questions and ideas
7
+ url: https://github.com/nasser1941/lcode/discussions
8
+ about: Ask questions and share what you built in GitHub Discussions.
9
+ - name: Report a security vulnerability
10
+ url: https://github.com/nasser1941/lcode/security/advisories/new
11
+ about: Please report security issues privately, not as public issues.
@@ -0,0 +1,27 @@
1
+ name: Feature request
2
+ description: Suggest an idea or improvement.
3
+ labels: [enhancement]
4
+ body:
5
+ - type: textarea
6
+ id: problem
7
+ attributes:
8
+ label: What problem would this solve?
9
+ description: Describe the situation where lcode falls short today.
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: proposal
14
+ attributes:
15
+ label: What would you like to happen?
16
+ validations:
17
+ required: true
18
+ - type: textarea
19
+ id: alternatives
20
+ attributes:
21
+ label: Alternatives you've considered
22
+ - type: checkboxes
23
+ id: contribute
24
+ attributes:
25
+ label: Contribution
26
+ options:
27
+ - label: I'd like to work on this myself
@@ -0,0 +1,42 @@
1
+ name: Model request or test report
2
+ description: Ask for a model to be added to the catalog, or report how a model runs on your hardware.
3
+ labels: [models]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: Real-world results decide which models lcode recommends, so reports are very welcome.
8
+ - type: input
9
+ id: tag
10
+ attributes:
11
+ label: Ollama tag
12
+ placeholder: e.g. qwen3.5:9b
13
+ validations:
14
+ required: true
15
+ - type: dropdown
16
+ id: kind
17
+ attributes:
18
+ label: Type
19
+ options:
20
+ - Please add this model to the catalog
21
+ - Test report for a catalog model
22
+ validations:
23
+ required: true
24
+ - type: input
25
+ id: hardware
26
+ attributes:
27
+ label: Hardware
28
+ placeholder: e.g. RTX 4070 12 GB + 32 GB RAM, or MacBook Pro M4 Pro 48 GB
29
+ validations:
30
+ required: true
31
+ - type: textarea
32
+ id: results
33
+ attributes:
34
+ label: Results
35
+ description: Context size used, tokens/s, whether tool calls (reading, editing, running commands) worked reliably, and anything odd.
36
+ validations:
37
+ required: true
38
+ - type: textarea
39
+ id: doctor
40
+ attributes:
41
+ label: Output of `lcode doctor`
42
+ render: text
@@ -0,0 +1,14 @@
1
+ ## What does this change?
2
+
3
+ <!-- A short description, and the issue it closes (e.g. "Closes #12"). -->
4
+
5
+ ## How was it tested?
6
+
7
+ <!-- Tests added, commands run, and for model changes: hardware, context size, tokens/s and a real task you tried. -->
8
+
9
+ ## Checklist
10
+
11
+ - [ ] `uv run pytest` and `uv run ruff check .` pass
12
+ - [ ] Tests cover the change
13
+ - [ ] Docs and `CHANGELOG.md` (*Unreleased*) are updated for user-facing changes
14
+ - [ ] No secrets, tokens, personal paths or private data are included
@@ -0,0 +1,16 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: uv
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ groups:
8
+ python-dependencies:
9
+ patterns: ["*"]
10
+ - package-ecosystem: github-actions
11
+ directory: /
12
+ schedule:
13
+ interval: weekly
14
+ groups:
15
+ actions:
16
+ patterns: ["*"]
@@ -0,0 +1,51 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ concurrency:
12
+ group: ci-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ lint:
17
+ name: Lint
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v7
21
+ - uses: astral-sh/setup-uv@v10.2.0
22
+ - run: uv run --group dev ruff check .
23
+ - run: uv run --group dev ruff format --check .
24
+ - name: Shellcheck install.sh
25
+ run: shellcheck install.sh
26
+
27
+ test:
28
+ name: Test (${{ matrix.os }}, Python ${{ matrix.python }})
29
+ runs-on: ${{ matrix.os }}
30
+ strategy:
31
+ fail-fast: false
32
+ matrix:
33
+ os: [ubuntu-latest, macos-latest]
34
+ python: ["3.10", "3.11", "3.12", "3.13"]
35
+ steps:
36
+ - uses: actions/checkout@v7
37
+ - uses: astral-sh/setup-uv@v10.2.0
38
+ with:
39
+ python-version: ${{ matrix.python }}
40
+ - run: uv run --group dev pytest
41
+
42
+ build:
43
+ name: Build package and docs
44
+ runs-on: ubuntu-latest
45
+ steps:
46
+ - uses: actions/checkout@v7
47
+ - uses: astral-sh/setup-uv@v10.2.0
48
+ - run: uv build
49
+ - name: Check the wheel ships the model catalog
50
+ run: unzip -l dist/*.whl | grep -q "lcode/models.toml"
51
+ - run: uv run --group docs mkdocs build --strict
@@ -0,0 +1,39 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: pages
15
+ cancel-in-progress: false
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v7
22
+ - uses: astral-sh/setup-uv@v10.2.0
23
+ - run: uv run --group docs mkdocs build --strict
24
+ - name: Publish the installer next to the site
25
+ run: cp install.sh site/install.sh
26
+ - uses: actions/configure-pages@v6
27
+ - uses: actions/upload-pages-artifact@v5
28
+ with:
29
+ path: site
30
+
31
+ deploy:
32
+ needs: build
33
+ runs-on: ubuntu-latest
34
+ environment:
35
+ name: github-pages
36
+ url: ${{ steps.deployment.outputs.page_url }}
37
+ steps:
38
+ - id: deployment
39
+ uses: actions/deploy-pages@v5
@@ -0,0 +1,36 @@
1
+ name: Release
2
+
3
+ # Publishes to PyPI when a GitHub release is published, using PyPI Trusted Publishing:
4
+ # no API token is stored anywhere. PyPI must list this repository, this workflow file and the
5
+ # "pypi" environment as a trusted publisher for the lcode-cli project.
6
+
7
+ on:
8
+ release:
9
+ types: [published]
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ pypi:
16
+ name: Publish to PyPI
17
+ runs-on: ubuntu-latest
18
+ environment:
19
+ name: pypi
20
+ url: https://pypi.org/project/lcode-cli/
21
+ permissions:
22
+ id-token: write # to prove to PyPI that the upload comes from this workflow
23
+ steps:
24
+ - uses: actions/checkout@v7
25
+ - uses: astral-sh/setup-uv@v10.2.0
26
+ - name: Check the release tag matches the package version
27
+ run: |
28
+ version=$(sed -n 's/^__version__ = "\(.*\)"/\1/p' src/lcode/__init__.py)
29
+ if [ "v$version" != "$GITHUB_REF_NAME" ]; then
30
+ echo "::error::Release tag $GITHUB_REF_NAME does not match package version $version"
31
+ exit 1
32
+ fi
33
+ - run: uv build
34
+ - name: Smoke-test the wheel
35
+ run: uvx --from dist/*.whl lcode --version
36
+ - run: uv publish --trusted-publishing always
@@ -0,0 +1,31 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+ build/
7
+ dist/
8
+ .venv/
9
+ venv/
10
+
11
+ # Tooling
12
+ .pytest_cache/
13
+ .ruff_cache/
14
+ .mypy_cache/
15
+ .coverage
16
+ htmlcov/
17
+
18
+ # Docs build output
19
+ site/
20
+
21
+ # Editors and OS
22
+ .idea/
23
+ .vscode/
24
+ *.swp
25
+ .DS_Store
26
+
27
+ # Secrets and local settings: never commit these
28
+ .env
29
+ .env.*
30
+ *.pem
31
+ *.key
@@ -0,0 +1,23 @@
1
+ # Install with: uvx pre-commit install
2
+ repos:
3
+ - repo: https://github.com/pre-commit/pre-commit-hooks
4
+ rev: v6.0.0
5
+ hooks:
6
+ - id: check-yaml
7
+ args: [--unsafe] # mkdocs.yml uses custom tags
8
+ - id: check-toml
9
+ - id: end-of-file-fixer
10
+ - id: trailing-whitespace
11
+ args: [--markdown-linebreak-ext=md]
12
+ - id: check-added-large-files
13
+ - id: detect-private-key
14
+ - repo: https://github.com/astral-sh/ruff-pre-commit
15
+ rev: v0.16.9
16
+ hooks:
17
+ - id: ruff-check
18
+ args: [--fix]
19
+ - id: ruff-format
20
+ - repo: https://github.com/gitleaks/gitleaks
21
+ rev: v8.30.1
22
+ hooks:
23
+ - id: gitleaks
@@ -0,0 +1,41 @@
1
+ # AGENTS.md
2
+
3
+ Guidance for coding agents (including lcode itself) working on this repository.
4
+
5
+ ## Overview
6
+
7
+ lcode is a terminal coding agent that runs open-weight models locally through Ollama. Python 3.10+,
8
+ packaged with hatchling, managed with uv. Runtime dependencies: requests, rich, prompt_toolkit
9
+ (and tomli on Python 3.10).
10
+
11
+ ## Commands
12
+
13
+ ```bash
14
+ uv sync --group dev # set up .venv
15
+ uv run pytest # tests (no Ollama needed)
16
+ uv run ruff check . && uv run ruff format --check .
17
+ uv run --group docs mkdocs build --strict # docs
18
+ uv run lcode doctor # check a local install against a running Ollama
19
+ ```
20
+
21
+ ## Architecture
22
+
23
+ - `src/lcode/cli.py` — entry point `lcode.cli:main`; chat by default, subcommands `setup`, `models`,
24
+ `doctor`, `config`. Resolves catalog keys to installed Ollama models (`resolve_model`) and picks
25
+ the context window (`choose_context`).
26
+ - `src/lcode/repl.py` — prompt_toolkit session, slash commands (`handle_command`), status bar.
27
+ - `src/lcode/agent.py` — `Agent.run_turn` loop: stream a response (`assistant_step`), run tool calls,
28
+ append `role: tool` messages, repeat. Also system prompt, sessions and compaction.
29
+ - `src/lcode/tools.py` — tool JSON schemas (`SCHEMAS`) and implementations (`Toolbox.t_<name>`).
30
+ Tools return strings; errors start with `Error:` and never raise into the loop.
31
+ - `src/lcode/catalog.py` + `src/lcode/models.toml` — model specs and memory estimates;
32
+ `src/lcode/hardware.py` detects NVIDIA VRAM or Apple unified memory.
33
+
34
+ ## Conventions
35
+
36
+ - Line length 120, ruff rules in `pyproject.toml`. Keep modules dependency-light.
37
+ - User-facing text: plain, specific, and actionable (say what to run to fix a problem).
38
+ - Every behavior change needs a test; use `FakeOllama` and the `make_agent` fixture from
39
+ `tests/conftest.py` to script model responses.
40
+ - Update `docs/` and `CHANGELOG.md` (*Unreleased*) for user-facing changes.
41
+ - Never commit secrets, personal paths or real user data.
@@ -0,0 +1,55 @@
1
+ # Changelog
2
+
3
+ All notable changes to lcode are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
5
+ [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.1] - 2026-09-28
10
+
11
+ ### Added
12
+
13
+ - `qwen3.5-9b` and `qwen3.5-4b` are now tested end to end, with measured speed and memory on a 12 GB
14
+ GPU in the docs. `lcode setup` now recommends only tested models on common machines.
15
+ - Social preview image for the repository and link previews for the docs site.
16
+ - Release workflow that publishes to PyPI with Trusted Publishing.
17
+
18
+ ### Changed
19
+
20
+ - Memory estimates use ~1 GB of runtime overhead instead of 1.5 GB, matching measurements, so small
21
+ models get larger context windows (e.g. `qwen3.5-9b` at 128K on a 12 GB GPU).
22
+
23
+ ### Fixed
24
+
25
+ - `lcode --model X` no longer reuses the context window saved for the default model; it picks the
26
+ largest window that fits X. `/model` does the same inside a session.
27
+ - `lcode models` fits in 80-column terminals.
28
+
29
+ ## [0.1.0] - 2026-09-28
30
+
31
+ First public release.
32
+
33
+ ### Added
34
+
35
+ - Interactive terminal agent with streaming markdown output, reasoning display, `@file` attachments,
36
+ slash commands, a status bar and resumable sessions (`lcode -c`).
37
+ - One-shot mode for scripts: `lcode -p "..."`.
38
+ - Tools for the model: `read_file`, `write_file`, `edit_file` (with diff previews and a
39
+ whitespace-tolerant fallback), `list_dir`, `glob`, `grep` (ripgrep with a pure-Python fallback),
40
+ `bash` (live output, timeouts, persistent working directory) and `todo_write`.
41
+ - Permission modes `ask`, `auto-edit` and `yolo` (Shift+Tab cycles), with a read-only command
42
+ allowlist and "always allow" per command.
43
+ - Model catalog with eight open-weight models, hardware detection for Linux + NVIDIA and Apple
44
+ Silicon Macs, and memory-fit estimates that pick the largest context window that fits.
45
+ - `lcode setup` (recommend, download and configure a model), `lcode models`, `lcode doctor` and
46
+ `lcode config`.
47
+ - Choice of context window per run (`--context 128k`), per session (`/ctx`) or in the config file.
48
+ - Text-only model variants that drop unused vision projectors to free GPU memory.
49
+ - Automatic conversation compaction when the context window is 85% full, plus `/compact`.
50
+ - `AGENTS.md` project instructions and `/init` to generate them.
51
+ - One-line installer for Linux and macOS.
52
+
53
+ [Unreleased]: https://github.com/nasser1941/lcode/compare/v0.1.1...HEAD
54
+ [0.1.1]: https://github.com/nasser1941/lcode/compare/v0.1.0...v0.1.1
55
+ [0.1.0]: https://github.com/nasser1941/lcode/releases/tag/v0.1.0
@@ -0,0 +1,131 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement (currently the
63
+ maintainer, [@nasser1941](https://github.com/nasser1941)) by email at
64
+ [nasser_derakhshan@yahoo.com](mailto:nasser_derakhshan@yahoo.com), privately through
65
+ [this confidential report form](https://github.com/nasser1941/lcode/security/advisories/new),
66
+ or with GitHub's "Report content" option on the comment.
67
+ All complaints will be reviewed and investigated promptly and fairly.
68
+
69
+ All community leaders are obligated to respect the privacy and security of the
70
+ reporter of any incident.
71
+
72
+ ## Enforcement Guidelines
73
+
74
+ Community leaders will follow these Community Impact Guidelines in determining
75
+ the consequences for any action they deem in violation of this Code of Conduct:
76
+
77
+ ### 1. Correction
78
+
79
+ **Community Impact**: Use of inappropriate language or other behavior deemed
80
+ unprofessional or unwelcome in the community.
81
+
82
+ **Consequence**: A private, written warning from community leaders, providing
83
+ clarity around the nature of the violation and an explanation of why the
84
+ behavior was inappropriate. A public apology may be requested.
85
+
86
+ ### 2. Warning
87
+
88
+ **Community Impact**: A violation through a single incident or series
89
+ of actions.
90
+
91
+ **Consequence**: A warning with consequences for continued behavior. No
92
+ interaction with the people involved, including unsolicited interaction with
93
+ those enforcing the Code of Conduct, for a specified period of time. This
94
+ includes avoiding interactions in community spaces as well as external channels
95
+ like social media. Violating these terms may lead to a temporary or
96
+ permanent ban.
97
+
98
+ ### 3. Temporary Ban
99
+
100
+ **Community Impact**: A serious violation of community standards, including
101
+ sustained inappropriate behavior.
102
+
103
+ **Consequence**: A temporary ban from any sort of interaction or public
104
+ communication with the community for a specified period of time. No public or
105
+ private interaction with the people involved, including unsolicited interaction
106
+ with those enforcing the Code of Conduct, is allowed during this period.
107
+ Violating these terms may lead to a permanent ban.
108
+
109
+ ### 4. Permanent Ban
110
+
111
+ **Community Impact**: Demonstrating a pattern of violation of community
112
+ standards, including sustained inappropriate behavior, harassment of an
113
+ individual, or aggression toward or disparagement of classes of individuals.
114
+
115
+ **Consequence**: A permanent ban from any sort of public interaction within
116
+ the community.
117
+
118
+ ## Attribution
119
+
120
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
121
+ version 2.0, available at
122
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
123
+
124
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
125
+ enforcement ladder](https://github.com/mozilla/diversity).
126
+
127
+ [homepage]: https://www.contributor-covenant.org
128
+
129
+ For answers to common questions about this code of conduct, see the FAQ at
130
+ https://www.contributor-covenant.org/faq. Translations are available at
131
+ https://www.contributor-covenant.org/translations.