docs

Sync a repository with the local CLI

Use the npm CLI to sync a repository from your own machine before adding CI automation.

Updated 2026-06-06

Authenticate

From the repository root, run:

npx testchronicle@latest login

The CLI opens a browser-based approval flow. After approval, select a project in the terminal. The CLI stores the project identifier in testchronicle.config.json and keeps the project token in your user configuration directory.

The repository file is not a secret. It connects sync commands from that checkout to the selected Test Chronicle project.

Run from the Git root

The sync process relies on repository metadata and should be started from within the Git working tree:

npx testchronicle@latest sync

The agent detects supported frameworks and scans matching test files.

Use local sync while checking:

  • The intended frameworks are detected.
  • Test directories and file patterns are correct.
  • Test names, tags, and files appear as expected.
  • The selected Test Chronicle project is correct.

Check the local state

Use the status command to confirm authentication and the linked project:

npx testchronicle@latest status

Run npx testchronicle@latest logout to remove the locally stored credentials.

Adjust project sync settings

If automatic detection does not match the repository, update the project settings in the Test Chronicle dashboard. Project settings can provide framework directory overrides, exclude test directories, set the default branch, and choose the framework used to represent the project.

Move to CI

Manual sync remains useful for evaluation and troubleshooting. Use the GitHub Action when the project should update automatically after changes reach the tracked branch.

Related reading

See it in Test Chronicle

Inspect a populated project or start tracking your own repository history.

Create a free account