Skip to content

Commit f24e1d6

Browse files
Jonathan D.A. Jewellclaude
andcommitted
feat: add export engine and command aliases
- Add tree_printer module for directory tree export functionality - Add --export mode with filtering options (--exclude-dirs, --exclude-files, --only-type, etc.) - Add treenav and tn aliases via justfile install-tn target - Add STATE.scm for project state tracking - Add SPDX-License-Identifier headers to all Ada source files - Enhanced main.adb with comprehensive CLI argument parsing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent bf912b7 commit f24e1d6

15 files changed

Lines changed: 723 additions & 63 deletions

STATE.scm

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
;; SPDX-License-Identifier: AGPL-3.0-or-later
2+
;; STATE.scm - Tree Navigator project state
3+
;; Updated: 2025-12-31
4+
5+
(define state
6+
`((metadata
7+
(version . "2.1.0")
8+
(schema-version . "1.0")
9+
(created . "2024-11-06")
10+
(updated . "2025-12-31")
11+
(project . "tree-navigator")
12+
(repo . "https://github.com/hyperpolymath/tree-navigator"))
13+
14+
(project-context
15+
(name . "Tree Navigator")
16+
(tagline . "Directory tree visualization and export tool")
17+
(tech-stack . (ada-2022 gnat gprbuild)))
18+
19+
(current-position
20+
(phase . "mvp-completion")
21+
(overall-completion . 75)
22+
(components
23+
((interactive-mode
24+
(status . complete)
25+
(completion . 100))
26+
(export-mode
27+
(status . just-implemented)
28+
(completion . 90))
29+
(filtering
30+
(status . implemented)
31+
(completion . 85))
32+
(tui-interface
33+
(status . planned)
34+
(completion . 0))
35+
(printer-support
36+
(status . planned)
37+
(completion . 0))))
38+
(working-features
39+
interactive-navigation
40+
bookmarks
41+
file-type-detection
42+
directory-exclusion
43+
file-exclusion
44+
tree-export
45+
statistics))
46+
47+
(route-to-mvp
48+
((milestone . "v2.1.0-export")
49+
(status . in-progress)
50+
(items
51+
((item . "Create tree_printer module")
52+
(status . done))
53+
((item . "Add --export flag to main.adb")
54+
(status . done))
55+
((item . "Add treenav alias")
56+
(status . done))
57+
((item . "Test build and export")
58+
(status . pending))
59+
((item . "Update CHANGELOG")
60+
(status . pending))))
61+
((milestone . "v2.2.0-tui")
62+
(status . planned)
63+
(items
64+
((item . "Ada/SPARK TUI framework")
65+
(status . planned))
66+
((item . "ncurses or custom terminal UI")
67+
(status . planned))
68+
((item . "Real-time tree navigation display")
69+
(status . planned)))))
70+
71+
(blockers-and-issues
72+
(critical . ())
73+
(high
74+
((issue . "Build not yet tested with new tree_printer module")
75+
(impact . "Cannot verify export functionality works")))
76+
(medium
77+
((issue . "README documents features not yet implemented")
78+
(impact . "User expectations mismatch")))
79+
(low . ()))
80+
81+
(critical-next-actions
82+
(immediate
83+
("Test gprbuild with new tree_printer module"
84+
"Verify export functionality works"
85+
"Update version to 2.1.0"))
86+
(this-week
87+
("Add SPDX headers to all Ada source files"
88+
"Update CHANGELOG.md for v2.1.0"
89+
"Create v2.1.0 release"))
90+
(this-month
91+
("Research Ada/SPARK TUI options"
92+
"Plan printer integration"
93+
"Consider winget submission like bunsenite")))
94+
95+
(session-history
96+
((date . "2025-12-31")
97+
(accomplishments
98+
"Created tree_printer.ads/adb export engine"
99+
"Updated main.adb with --export flag handling"
100+
"Added treenav alias to justfile"
101+
"Created STATE.scm")))))

justfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -426,28 +426,35 @@ ci-deploy-stage:
426426
@echo "🚀 CI Deploy stage"
427427
@echo "Not implemented yet"
428428

429-
# Install with short alias 'tn'
429+
# Install with short aliases 'tn' and 'treenav'
430430
install-tn: release
431-
@echo "📦 Installing Tree Navigator with 'tn' alias..."
431+
@echo "📦 Installing Tree Navigator with aliases..."
432432
sudo install -m 755 bin/main /usr/local/bin/tn
433+
sudo ln -sf /usr/local/bin/tn /usr/local/bin/treenav
433434
sudo ln -sf /usr/local/bin/tn /usr/local/bin/tree-navigator
434435
sudo mkdir -p /usr/local/share/man/man1
435436
sudo cp man/tree-navigator.1 /usr/local/share/man/man1/
437+
sudo ln -sf tree-navigator.1.gz /usr/local/share/man/man1/tn.1.gz 2>/dev/null || true
438+
sudo ln -sf tree-navigator.1.gz /usr/local/share/man/man1/treenav.1.gz 2>/dev/null || true
436439
sudo gzip -f /usr/local/share/man/man1/tree-navigator.1
437440
sudo mandb 2>/dev/null || true
438441
@echo "✅ Installed!"
439442
@echo ""
440-
@echo "Use: tn --help"
441-
@echo "Or: tree-navigator --help"
443+
@echo "Commands available:"
444+
@echo " tn # shortest"
445+
@echo " treenav # medium"
446+
@echo " tree-navigator # full name"
442447
@echo ""
443-
@echo "Add shell alias:"
444-
@echo " echo \"alias tn='tree-navigator'\" >> ~/.bashrc"
448+
@echo "Try: tn --help"
445449

446-
# Uninstall tn
450+
# Uninstall tn, treenav, and tree-navigator
447451
uninstall-tn:
448452
@echo "🗑️ Uninstalling Tree Navigator..."
449453
sudo rm -f /usr/local/bin/tn
454+
sudo rm -f /usr/local/bin/treenav
450455
sudo rm -f /usr/local/bin/tree-navigator
451456
sudo rm -f /usr/local/share/man/man1/tree-navigator.1.gz
457+
sudo rm -f /usr/local/share/man/man1/tn.1.gz
458+
sudo rm -f /usr/local/share/man/man1/treenav.1.gz
452459
sudo mandb 2>/dev/null || true
453460
@echo "✅ Uninstalled"

src/bookmarks.adb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
-- SPDX-License-Identifier: AGPL-3.0-or-later
2+
-- Bookmark management implementation
13
pragma Ada_2022;
24
with Ada.Text_IO; use Ada.Text_IO;
35
with Ada.Directories;

src/bookmarks.ads

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
-- SPDX-License-Identifier: AGPL-3.0-or-later
12
-- Bookmark management with persistence
23
pragma Ada_2022;
34
with Ada.Calendar;

src/config.adb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
-- SPDX-License-Identifier: AGPL-3.0-or-later
2+
-- Configuration management implementation
13
pragma Ada_2022;
24

35
package body Config is

src/config.ads

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
-- SPDX-License-Identifier: AGPL-3.0-or-later
12
-- Configuration management with strong typing
23
pragma Ada_2022;
34

src/file_types.adb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
-- SPDX-License-Identifier: AGPL-3.0-or-later
2+
-- File type detection implementation
13
pragma Ada_2022;
24
with Ada.Strings.Fixed;
35

src/file_types.ads

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
-- SPDX-License-Identifier: AGPL-3.0-or-later
12
-- File type detection and classification
23
pragma Ada_2022;
34
with Ada.Directories;

0 commit comments

Comments
 (0)