atlas
Copilot instructions1.3k starsChanged 12 months agoMITView on GitHub
Keep this short and actionable. Prefer small, focused changes and reference the exact files shown below.
- Installs packages
We split this copilot-instructions.md into the rules it gives an agent
14 rules. About 1 is common, 6 are distinctive, and 7 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 3
Keep this short and actionable.
- Very specific: line 26
Run a single command: ./atlas fastscan or ./atlas deepscan.
- Distinctive: line 27
Run container similar to production when testing network behavior (required caps and socket):
- Very specific: line 30
Check logs: /config/logs/deep_scan_progress.log, /config/logs/nmap_tcp_<ip>.log.
- Very specific: line 42
Test changes quickly (deploy.sh)
- Very specific: line 43
Use ./deploy.sh to build the React UI, write data/html/build-info.json, build the Docker image, and run a local container on host network.
- Distinctive: line 44
Default policy: always test locally, do NOT push by default.
- Distinctive: line 48
After it starts, open:
- Common: line 51
If you hit Docker socket permission errors (permission denied):
- Very specific: line 52
Ensure your user is in the docker group, then refresh the session with newgrp docker in the same terminal and re-run the command.
- Very specific: line 57
Update or respect DB schema and ON CONFLICT keys (ip + interface_name for hosts).
- Very specific: line 58
If changing interface/subnet discovery, run manual validation: multiple interfaces with different subnets (see issue 27).
- Distinctive: line 59
Keep parse helpers (nmap/docker inspect) in internal/scan.
- Distinctive: line 72
If anything in this file is unclear or you want more examples (DB schema, specific SQL statements, or how the UI expects API responses), …
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
copilot / AI agent instructions — atlas
Keep this short and actionable. Prefer small, focused changes and reference the exact files shown below.
- Big picture
- Atlas is a single-container app that combines a Go CLI scanner, a FastAPI backend, Nginx, and a React static UI.
- Main Go CLI:
config/atlas_go/main.go— commands:initdb,fastscan,deepscan,dockerscan. - Frontend:
data/react-ui/(Vite + React). Build withnpm install && npm run build, then copy the output intodata/html/(Dockerfile does this in CI/deploy). - Entrypoint & runtime layout: container expects runtime configuration under
/config(binary at/config/bin/atlas, DB at/config/db/atlas.db, logs at/config/logs). SeeDockerfileandconfig/scripts/atlas_check.shfor startup.
- Where to change code
- Backend scanner logic:
config/atlas_go/internal/scan/*.go(notablyfastscan.go,deep_scan.go,docker_scan.go). - DB helpers:
config/atlas_go/internal/db/and SQLite usage is pervasive; queries useON CONFLICT(ip, interface_name)semantics — keep key shapes consistent. - FastAPI:
scripts/app.py(API surface used by the UI; proxy config inconfig/nginx/default.conf.template). - UI:
data/react-ui/src/*and components underdata/react-ui/src/components/.
- Project-specific conventions and patterns
- Interface-aware host model: hosts are keyed by (ip, interface_name). When updating or inserting hosts, use the same conflict/unique keys to avoid duplicate rows. See
deep_scan.goandfastscan.goSQL statements. - Scans run per-network-interface. Use
utils.GetAllInterfaces()(internal utilities) to enumerate interfaces and loop each subnet separately — previous bug (issue 27) was about scanning only one interface; PRs 61 and 62 fixed it. If modifying scan logic, ensure the function still iterates all returned interfaces. - External tools are required at runtime:
nmap,nbtscan,dockerCLI,curl,hostname, etc. Code calls these viaexec.Command(...)and parses their stdout. Add unit tests around parsing helpers when possible. - Long-running commands write logs under
/config/logs(e.g.,nmap_tcp_<ip>.log,deep_scan_progress.log) — use these when debugging.
- Dev & debug workflows (examples)
- Build the Go binary locally for fast iteration:
- cd
config/atlas_go&&go build -o atlas . - Run a single command:
./atlas fastscanor./atlas deepscan.
- cd
- Run container similar to production when testing network behavior (required caps and socket):
- docker run --network=host --cap-add=NET_RAW --cap-add=NET_ADMIN -v /var/run/docker.sock:/var/run/docker.sock -e ATLAS_UI_PORT=8884 -e ATLAS_API_PORT=8885 keinstien/atlas:pr-62
- Inspect DB state:
sqlite3 /config/db/atlas.dbinside the running container. - Check logs:
/config/logs/deep_scan_progress.log,/config/logs/nmap_tcp_<ip>.log.
- Env vars and runtime knobs
- See
DockerfileandREADME.mdfor defaults. Important ones:ATLAS_UI_PORT(UI/Nginx),ATLAS_API_PORT(FastAPI)FASTSCAN_INTERVAL,DOCKERSCAN_INTERVAL,DEEPSCAN_INTERVAL(seconds)SCAN_SUBNETS— comma-separated override; otherwise interfaces are auto-detected.
- Safety and runtime expectations
- Code assumes the container has host network access and tools installed. If a developer runs locally without those tools, mocks or stubs are required.
Many scan functions call external CLIs; keep parsing robust to missing/changed output and prefer small, isolated changes.
- Test changes quickly (deploy.sh)
- Use
./deploy.shto build the React UI, writedata/html/build-info.json, build the Docker image, and run a local container on host network. - Default policy: always test locally, do NOT push by default.
- Preferred non-interactive validation (no push):
VERSION=dev-local TAG_LATEST=n DO_PUSH=false /home/vscode/atlas/deploy.sh- To push intentionally, set
DO_PUSH=trueor answerywhen prompted. - After it starts, open:
- Local UI:
http://192.168.2.81:8884/ - Swagger via Nginx:
http://192.168.2.81:8884/api/docs
- Local UI:
- If you hit Docker socket permission errors (permission denied):
- Ensure your user is in the
dockergroup, then refresh the session withnewgrp dockerin the same terminal and re-run the command. - Alternatively, start a new login session after running:
sudo usermod -aG docker $USER
- Ensure your user is in the
- You can tag/push by answering
yto prompts, or by settingDO_PUSH=trueexplicitly.
- Small checklist when making changes
- Update or respect DB schema and
ON CONFLICTkeys (ip + interface_name for hosts). - If changing interface/subnet discovery, run manual validation: multiple interfaces with different subnets (see issue 27). Confirm entries are created for each interface in
/config/db/atlas.db. Keep parse helpers (nmap/docker inspect) in internal/scan; add unit tests for any regex/json parsing you change.
- Useful references in the repo
config/atlas_go/main.go(CLI entrypoints)config/atlas_go/internal/scan/fastscan.goconfig/atlas_go/internal/scan/deep_scan.goconfig/atlas_go/internal/scan/docker_scan.goconfig/nginx/default.conf.templatedata/react-ui/package.json(dev/build commands)deploy.sh(CI build/publish flow)Dockerfile(container layout and runtime env vars)- Issue that motivated recent change: https://github.com/karam-ajaj/atlas/issues/27 (multi-interface scanning, fixed by PRs 61 and 62 — check
pr-62image/tag while testing)
If anything in this file is unclear or you want more examples (DB schema, specific SQL statements, or how the UI expects API responses), tell me which area and I will expand with a minimal example.
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about karam-ajaj/atlas
- A Hacker News story“Show HN: Atlas – Open-source network discovery and visualization tool”Hacker News · Sep 16, 2025 · 2 points
- splitbrain/infra-nas-docker“give atlas a try”GitHub · Sep 26, 2025
The biggest 2 of 2 mentions linking to the repository that our crawl found. Each line is their own headline.
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

