Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ee5b1dd
chore(deps): bump golang.org/x/crypto from 0.21.0 to 0.31.0 (#1)
dependabot[bot] Dec 22, 2024
edd5fda
chore: update README.md
biasedbit Dec 22, 2024
ff57bda
chore: update .sandwormignore
biasedbit Dec 22, 2024
9e825ef
chore: update CHANGELOG
biasedbit Dec 22, 2024
206d768
feat: setup goreleaser to update brew formula
biasedbit Dec 22, 2024
72a7f8a
fix: release env var
biasedbit Dec 22, 2024
4f4fb4c
fix: update goreleaser
biasedbit Dec 22, 2024
f0ef126
chore: update README with install instructions
biasedbit Dec 23, 2024
e5656a9
fix: remove unnecessary go dependency
biasedbit Dec 23, 2024
23ed3be
fix: brew test command
biasedbit Dec 23, 2024
270d4e5
fix: special handling for when Claude is in the strugglebus
biasedbit Dec 23, 2024
49e322a
chore: update README
biasedbit Jan 4, 2025
9743f5e
fix: support target folder for default command
biasedbit Jan 6, 2025
f7dbdcd
chore: reuse newPushCmd code
biasedbit Jan 6, 2025
9882534
chore: update CHANGELOG
biasedbit Jan 6, 2025
ff2d9e9
fix(CWE-770,CWE-440): bump golang.org/x/net
biasedbit Jan 6, 2025
9ddefe5
feat: global configuration support
fredoliveira Feb 13, 2025
927abc9
chore: resolved goreleaser deprecation warning
fredoliveira Feb 13, 2025
2666719
chore(deps): bump github.com/go-git/go-git/v5 from 5.12.0 to 5.13.0 (#3)
dependabot[bot] Feb 22, 2025
86cec6e
chore(deps): bump golang.org/x/net from 0.33.0 to 0.38.0 (#5)
dependabot[bot] Jun 13, 2025
26db2ca
chore: swap .tool-version with mise.toml
biasedbit Jun 13, 2025
8087201
chore: add -dev suffix to installed dev binary
biasedbit Jun 13, 2025
5e90d9d
chore: add just task to update project deps
biasedbit Jun 13, 2025
092e499
chore: bump deps
biasedbit Jun 13, 2025
257287e
chore: update linter config and code to match
biasedbit Jun 13, 2025
d8c1f9c
fix: adjust base url
biasedbit Jun 13, 2025
c27c1ed
cosmetic: modernize interface{} to any
biasedbit Jun 13, 2025
68236a8
chore: align go.mod go version with mise.toml
biasedbit Jun 13, 2025
00ea619
chore: instal to $GOBIN rather than $GOPATH/bin
biasedbit Jun 13, 2025
945a108
chore: update CI workflows
biasedbit Jun 13, 2025
04b7a16
chore: update CHANGELOG
biasedbit Jun 13, 2025
db24785
feat(Pathing): Add Windows Pathing Compatibility
TWDickson Jun 19, 2025
675d05c
chore: bump golang to 1.24.5 & bump all deps
biasedbit Jul 18, 2025
ea3db4a
fix: use gh action to setup just
biasedbit Jul 18, 2025
908fcc7
fix: lock CI package versions to match mise.toml
biasedbit Jul 18, 2025
9ebaaf4
refactor: lift CLI logic to its own package
biasedbit Jul 18, 2025
b4db028
Optionally add line numbers to output (#8)
biasedbit Jul 18, 2025
f51aff2
chore: prep 0.2.0 release
biasedbit Jul 18, 2025
8f941a7
feat(Pathing): :sparkles: Add Windows Pathing Compatibility
TWDickson Jun 16, 2025
9dc6c41
fix(Pathing): :bug: Remove filepath.ToSlash in favour of splitting wi…
TWDickson Jun 19, 2025
7f3dfc2
feat(Pathing): :heavy_plus_sign: Add GoDirWalk Dependency
TWDickson Jun 17, 2025
b8c920e
feat(Pathing): :sparkles: Add configuration management commands and f…
TWDickson Jun 17, 2025
a79da90
feat(Pathing): :sparkles: Add skeleton support for following symbolic…
TWDickson Jun 17, 2025
4ae9466
feat(Pathing): :sparkles: Set Processor Symlink Handling in Main
TWDickson Jun 17, 2025
5653f4f
feat(Pathing): :sparkles: Use GoDirWalk in Processor.collectFiles for…
TWDickson Jun 17, 2025
2b14848
test(Pathing): :white_check_mark: Add SymLink Processor Tests
TWDickson Jun 17, 2025
1714375
docs(Pathing): :memo: Update Readme for new sym link config
TWDickson Jun 17, 2025
c23f4d8
chore(GitIgnore): :see_no_evil: Add .VSCode to gitignore
TWDickson Jun 19, 2025
c2bea0a
refactor: :twisted_rightwards_arrows: Rebase on Master: Further Work …
TWDickson Jul 18, 2025
7b75ee8
refactor(Config): :fire: Remove Old Config File
TWDickson Jul 18, 2025
9792643
feat: :sparkles: Update Sym Link Following, Fix Missing Code from Merge
TWDickson Jul 18, 2025
52f449b
feat: :sparkles: Enhance CLI Options Handling and Add Tests for Gener…
TWDickson Jul 18, 2025
4985d9c
docs: :memo: Update Readme for Line Number Flag
TWDickson Jul 18, 2025
3da8acd
chore: Resolve Conflicts and update go.mod and go.sum
TWDickson Jul 18, 2025
52602c5
fix: :rotating_light: Fix Linter Warnings from CI Build
TWDickson Jul 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ go.work
# Sandworm specific
.sandworm
.sandworm*.txt

# VSCode
.vscode/
56 changes: 48 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ whole project as context.

### Usage

```
```text
Project file concatenator

Usage:
Expand All @@ -63,18 +63,21 @@ Usage:

Available Commands:
completion Generate the autocompletion script for the specified shell
config Manage project configuration
generate Generate concatenated file only
help Help about any command
purge Remove all files from Claude project
push Generate and push to Claude
setup Configure Claude project

Flags:
-h, --help help for sandworm
--ignore string Ignore file (default: .gitignore)
-k, --keep Keep the generated file after pushing
-o, --output string Output file
-v, --version version for sandworm
-h, --help help for sandworm
--ignore string Ignore file (default: .gitignore)
-k, --keep Keep the generated file after pushing
-L, --follow-symlinks Follow symbolic links when traversing directories
-n, --line-numbers Show line numbers in output (can also be set via config)
-o, --output string Output file
-v, --version version for sandworm

Use "sandworm [command] --help" for more information about a command.
```
Expand Down Expand Up @@ -106,6 +109,24 @@ Keep the uploaded file for inspection:
sandworm push -k
```

Follow symbolic links when traversing directories:

```bash
sandworm -L
```

Show line numbers in output:

```bash
sandworm -n
```

Configure project to always follow symbolic links:

```bash
sandworm config set processor.follow_symlinks true
```

Generate only, don't push to Claude Project:

```bash
Expand All @@ -121,13 +142,32 @@ Sandworm maintains configuration in two places:

The first is used for global configuration, like your Claude session key. The
latter is project-specific, and stores your Claude organization ID, project ID,
and the document ID for the file that holds your condensed project.
the document ID for the file that holds your condensed project, and other
project-specific settings.

#### Project Configuration Options

- `processor.follow_symlinks`: Set to `true` to always follow symbolic links when traversing directories

```bash
# Enable following symlinks for this project
sandworm config set processor.follow_symlinks true

# Disable following symlinks for this project
sandworm config set processor.follow_symlinks false

# Check current setting
sandworm config get processor.follow_symlinks

# List all available configuration options
sandworm config list
```

### Output Format

The generated file will have the structure:

```
```text
PROJECT STRUCTURE:
================

Expand Down
3 changes: 2 additions & 1 deletion cmd/sandworm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
)

func main() {
if err := cli.NewRootCmd().Execute(); err != nil {
opts := &cli.Options{}
if err := cli.NewRootCmd(opts).Execute(); err != nil {
os.Exit(1)
}
}
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.24.5

require (
github.com/go-git/go-git/v5 v5.16.2
github.com/karrick/godirwalk v1.17.0
github.com/spf13/cobra v1.9.1
)

Expand Down
18 changes: 18 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic=
github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM=
github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU=
github.com/go-git/go-git/v5 v5.16.2 h1:fT6ZIOjE5iEnkzKyxTHK1W4HGAsPhqEqiSAssSO77hM=
github.com/go-git/go-git/v5 v5.16.2/go.mod h1:4Ge4alE/5gPs30F2H1esi2gPd69R0C39lolkucHBOp8=
github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM=
github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU=
github.com/go-git/go-git/v5 v5.16.2 h1:fT6ZIOjE5iEnkzKyxTHK1W4HGAsPhqEqiSAssSO77hM=
github.com/go-git/go-git/v5 v5.16.2/go.mod h1:4Ge4alE/5gPs30F2H1esi2gPd69R0C39lolkucHBOp8=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/karrick/godirwalk v1.17.0 h1:b4kY7nqDdioR/6qnbHQyDvmA17u5G1cZ6J+CZXwSWoI=
github.com/karrick/godirwalk v1.17.0/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
Expand All @@ -17,6 +24,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
Expand All @@ -25,9 +34,18 @@ github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo=
github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.7 h1:vN6T9TfwStFPFM5XzjsvmzZkLuaLX+HS+0SeFLRgU6M=
github.com/spf13/pflag v1.0.7/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
13 changes: 10 additions & 3 deletions internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ var (
)

// NewRootCmd creates the root command with all subcommands
func NewRootCmd() *cobra.Command {
opts := &Options{}

func NewRootCmd(opts *Options) *cobra.Command {
if opts == nil {
opts = &Options{}
}
rootCmd := &cobra.Command{
Use: "sandworm [directory]",
Short: "Project file concatenator",
Expand All @@ -33,6 +34,9 @@ func NewRootCmd() *cobra.Command {
rootCmd.PersistentFlags().StringVarP(&opts.IgnoreFile, "ignore", "i", "", "Ignore file (default: .gitignore)")
rootCmd.PersistentFlags().BoolVarP(&opts.KeepFile, "keep", "k", false, "Keep the generated file after pushing")

var followSymlinks bool
rootCmd.PersistentFlags().BoolVarP(&followSymlinks, "follow-symlinks", "L", false, "Follow symbolic links when traversing directories")

var showLineNumbers bool
rootCmd.PersistentFlags().BoolVarP(&showLineNumbers, "line-numbers", "n", false, "Show line numbers in output (overrides config setting)")
rootCmd.PersistentPreRunE = func(cmd *cobra.Command, _ []string) error {
Expand All @@ -41,6 +45,9 @@ func NewRootCmd() *cobra.Command {
if cmd.Flags().Changed("line-numbers") {
opts.ShowLineNumbers = &showLineNumbers
}
if cmd.Flags().Changed("follow-symlinks") {
opts.FollowSymlinks = &followSymlinks
}
return nil
}

Expand Down
96 changes: 96 additions & 0 deletions internal/cli/cli_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package cli

import (
"os"
"path/filepath"
"testing"
)

func TestGenerateCmd_Flags(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

tmpDir, err := os.MkdirTemp("", "sandworm-cli-test-*")
if err != nil {
t.Fatalf("Failed to create temp dir: %v", err)
}
defer os.RemoveAll(tmpDir)

opts := &Options{}
rootCmd := NewRootCmd(opts)
rootCmd.SetArgs([]string{"generate", tmpDir, "--line-numbers", "--follow-symlinks"})
err = rootCmd.Execute()
if err != nil {
t.Fatalf("Command failed: %v", err)
}

if opts.ShowLineNumbers == nil || !*opts.ShowLineNumbers {
t.Errorf("Expected ShowLineNumbers to be true, got %v", opts.ShowLineNumbers)
}
if opts.FollowSymlinks == nil || !*opts.FollowSymlinks {
t.Errorf("Expected FollowSymlinks to be true, got %v", opts.FollowSymlinks)
}
if opts.Directory != tmpDir {
t.Errorf("Expected Directory to be '%v', got %v", tmpDir, opts.Directory)
}

// Clean up generated output file
os.Remove("sandworm.txt")
}

func TestGenerateCmd_FlagsOverrideConfig(t *testing.T) {
tmpDir, err := os.MkdirTemp("", "sandworm-cli-test-*")
if err != nil {
t.Fatalf("Failed to create temp dir: %v", err)
}
defer os.RemoveAll(tmpDir)

opts := &Options{}
rootCmd := NewRootCmd(opts)
rootCmd.SetArgs([]string{"generate", tmpDir, "--line-numbers=false", "--follow-symlinks=false"})
err = rootCmd.Execute()
if err != nil {
t.Fatalf("Command failed: %v", err)
}

if opts.ShowLineNumbers == nil || *opts.ShowLineNumbers {
t.Errorf("Expected ShowLineNumbers to be false, got %v", opts.ShowLineNumbers)
}
if opts.FollowSymlinks == nil || *opts.FollowSymlinks {
t.Errorf("Expected FollowSymlinks to be false, got %v", opts.FollowSymlinks)
}

// Clean up generated output file
os.Remove("sandworm.txt")
}

func TestGenerateCmd_OutputIgnoreKeepFlags(t *testing.T) {
tmpDir, err := os.MkdirTemp("", "sandworm-cli-test-*")
if err != nil {
t.Fatalf("Failed to create temp dir: %v", err)
}
defer os.RemoveAll(tmpDir)

outputFile := "myoutput.txt"
ignoreFile := "myignore.txt"
ignorePath := filepath.Join(tmpDir, ignoreFile)
if err := os.WriteFile(ignorePath, []byte("*.tmp\n"), 0o644); err != nil {
t.Fatalf("Failed to create dummy ignore file: %v", err)
}

opts := &Options{}
rootCmd := NewRootCmd(opts)
rootCmd.SetArgs([]string{"generate", tmpDir, "--output", outputFile, "--ignore", ignorePath, "--keep"})
if err := rootCmd.Execute(); err != nil {
t.Fatalf("Command failed: %v", err)
}
// Clean up generated output file
os.Remove(outputFile)

if opts.OutputFile != outputFile {
t.Errorf("Expected OutputFile to be '%v', got '%v'", outputFile, opts.OutputFile)
}
if opts.IgnoreFile != ignorePath {
t.Errorf("Expected IgnoreFile to be '%v', got '%v'", ignorePath, opts.IgnoreFile)
}
if !opts.KeepFile {
t.Errorf("Expected KeepFile to be true, got %v", opts.KeepFile)
}
}
45 changes: 32 additions & 13 deletions internal/cli/cmd_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,44 @@ func runGenerate(opts *Options) (int64, error) {
opts.Directory = "."
}

printLineNumbers := false
if opts.ShowLineNumbers != nil {
printLineNumbers = *opts.ShowLineNumbers
} else {
// If line-numbers flag wasn't explicitly set, load & check the project's settings.
cfg, err := config.New(opts.Directory)
if err != nil {
return 0, fmt.Errorf("unable to load config: %w", err)
}
// Resolve all processor options from flags/config/defaults
cfg, err := config.New(opts.Directory)
if err != nil {
return 0, fmt.Errorf("unable to load config: %w", err)
}

if opts.ShowLineNumbers == nil {
if cfg.Has("processor.print_line_numbers") {
value := cfg.Get("processor.print_line_numbers")
if value == "true" {
printLineNumbers = true
}
b := value == "true"
opts.ShowLineNumbers = &b
}
}

if opts.FollowSymlinks == nil {
if cfg.Has("processor.follow_symlinks") {
value := cfg.Get("processor.follow_symlinks")
b := value == "true"
opts.FollowSymlinks = &b
}
}

p, err := processor.New(opts.Directory, opts.OutputFile, opts.IgnoreFile, printLineNumbers)
printLineNumbers := false
if opts.ShowLineNumbers != nil {
printLineNumbers = *opts.ShowLineNumbers
}
followSymlinks := false
if opts.FollowSymlinks != nil {
followSymlinks = *opts.FollowSymlinks
}

// Resolve processor options from CLI options
procOpts := processor.SandwormOptions{
PrintLineNumbers: printLineNumbers,
FollowSymlinks: followSymlinks,
}

p, err := processor.NewWithOptions(opts.Directory, opts.OutputFile, opts.IgnoreFile, procOpts)
if err != nil {
return 0, fmt.Errorf("unable to create processor: %w", err)
}
Expand Down
5 changes: 5 additions & 0 deletions internal/cli/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
)

// Options holds the command-line options shared across commands
// If a value is nil, it will be resolved from config; otherwise, the CLI value overrides config.
type Options struct {
// OutputFile specifies the path where the concatenated project file will be written.
// If empty, defaults are applied based on the command context.
Expand All @@ -30,6 +31,10 @@ type Options struct {
// ShowLineNumbers determines whether to show line numbers in the output.
// If nil, the value from config will be used. If set, it overrides the config.
ShowLineNumbers *bool

// FollowSymlinks determines whether to follow symbolic links when traversing directories.
// If nil, the value from config will be used. If set, it overrides the config.
FollowSymlinks *bool
}

// SetDefaults sets default values for options based on the command context
Expand Down
Loading