Skip to content

feat: add config command to show config path - #117

Merged
Yukaii merged 3 commits into
hackmdio:developfrom
devKobe24:feat/config-command
Nov 24, 2026
Merged

Yukaii merged 3 commits into
hackmdio:developfrom
devKobe24:feat/config-command

Conversation

@devKobe24

Copy link
Copy Markdown
Contributor

Closes #45

Summary

Adds a config command that prints the config file path and current settings.
The access token value is never printed — only whether it is set.

Usage

$ hackmd-cli config
Config file: /Users/you/.hackmd/config.json
hackmdAPIEndpointURL: https://api.hackmd.io/v1
accessToken: (set)

$ hackmd-cli config --path
/Users/you/.hackmd/config.json

Tests

  • Added test/config-command.test.ts, including a check that the token value is never printed
  • pnpm test: all passing, lint clean (Node 24)

@devKobe24

Copy link
Copy Markdown
Contributor Author

@EastSun5566 Friendly ping 🙂 Happy to make any changes if something needs adjusting.

@EastSun5566
EastSun5566 self-requested a review October 14, 2026 13:42

@EastSun5566 EastSun5566 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@devKobe24 Sorry for the late reply. Thanks! This looks good to me. But we have an internal process to release, so we may need to wait a little bit. cc @Yukaii

Yukaii and others added 2 commits November 24, 2026 17:13
Agent: T3 Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: T3 Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Yukaii Yukaii left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed: new config command reuses getConfigFilePath() and the merged config (env > file > defaults), never prints the token value (only set/not set), --path prints just the path; tests cover all four cases. Merged develop in, matched repo formatting (no semicolons) and added a README pointer under Configuration Reference. Build, unit tests, lint and a manual run of the built CLI pass locally; CI green. Thanks @devKobe24!

Reviewed by T3 Code (Claude Opus 5.5) on Yukai's behalf.

@Yukaii
Yukaii merged commit af027be into hackmdio:develop Nov 24, 2026
3 checks passed
@devKobe24

Copy link
Copy Markdown
Contributor Author

Thanks for the review and the cleanup — noted on the formatting and the README pointer. 🙏

@devKobe24
devKobe24 deleted the feat/config-command branch November 25, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config command

3 participants