flagship analyze
Analyze your codebase using the codebase analyzer
flagship analyze flag
NAME
flagship analyze flag
- Analyze your codebase and detect the usage of Flagship or custom flags.
SYNOPSIS
flagship analyze flag [--directory=DIRECTORY --repository-url=REPOSITORY_URL --repository-branch=REPOSITORY_BRANCH --code-edge=CODE_EDGE --files-exclude=FILES_EXCLUDE [--custom-regex=CUSTOM_REGEX | --custom-regex-json=CUSTOM-REGEX-JSON]]
DESCRIPTION
Analyze your codebase and detect the usage of Flagship flags or custom flags.
EXAMPLES
flagship analyze flag --directory="./" --repository-url="https://github.com/org/repo" --repository-branch="main" --files-exclude="[\".git\", \".github\", \".vscode\", \".idea\"]" --custom-regex="[{\"file_extension\":\".go?\",\"regexes\":[\"(?:Bool|String|Float64)Variation[(](?:\\\\s*[\\\"\\\\'](.*)[\\\"\\\\']\\\\s*,\\\\s*([\\\"\\\\'].*\\\\s*[^\\\"]*[\\\"\\\\']|[^)]*))\\\\s*[)]\"]}]"
FLAGS
--directory = DIRECTORY
Directory to analyze in your codebase. The default value is ".".
--repository-url= REPOSITORY_URL
The root URL of your repository, it's also used to track the links of the files where your flags are used. The default value is "https://github.com/org/repo".
--repository-branch= REPOSITORY_BRANCH
Branch of the code you want to analyze, it's also used to track the links of the files where your flags are used. The default is "main".
--code-edge= CODE_EDGE
Number of line of code you want to capture before and after the line that contains the flag. The default is 1.
--files-exclude= FILES_EXCLUDE
List of files to exclude in the analysis. The default are "[".git", ".github", ".vscode", ".idea"]".
--custom-regex= CUSTOM_REGEX
If you are not using Flagship, you can put a custom regex for the pattern you want to analyze.
--custom-regex-json= CUSTOM_REGEX_JSON
JSON file where you put the custom regex for the pattern you want to analyze.
--origin-platform= ORIGIN_PLATFORM
The name of the feature flag plateform you want to analyze, we support launchdarkly, optimizelyn split, vwo.
Custom regex format
Note that you should insert data without spaces, line breaks, tabulation etc... check this section in codebase analyzer doc section
flagship analyze flag create
This command will automatically create flag detected !
There is no confirmation step to create flag detected, so we recommend using
flagship analyze flag list
to check detected flags and their properties.
NAME
flagship analyze flag create
- Analyze your codebase and automatically create flags detected
SYNOPSIS
flagship analyze flag create [--directory=DIRECTORY --repository-url=REPOSITORY_URL --repository-branch=REPOSITORY_BRANCH --code-edge=CODE_EDGE --files-exclude=FILES_EXCLUDE [--custom-regex=CUSTOM_REGEX | --custom-regex-json=CUSTOM-REGEX-JSON]]
DESCRIPTION
Analyze your codebase and create automatically the flags detected to the Flagship platform.
EXAMPLES
flagship analyze flag create --directory="./" --repository-url="https://github.com/org/repo" --repository-branch="main" --files-exclude="[\".git\", \".github\", \".vscode\", \".idea\"]" --custom-regex="[{\"file_extension\":\".go?\",\"regexes\":[\"(?:Bool|String|Float64)Variation[(](?:\\\\s*[\\\"\\\\'](.*)[\\\"\\\\']\\\\s*,\\\\s*([\\\"\\\\'].*\\\\s*[^\\\"]*[\\\"\\\\']|[^)]*))\\\\s*[)]\"]}]"
FLAGS
--directory = DIRECTORY
Directory to analyze in your codebase. The default value is ".".
--repository-url= REPOSITORY_URL
The root URL of your repository, it's also used to track the links of the files where your flags are used. The default value is "https://github.com/org/repo".
--repository-branch= REPOSITORY_BRANCH
Branch of the code you want to analyze, it's also used to track the links of the files where your flags are used. The default is "main".
--code-edge= CODE_EDGE
Number of line of code you want to capture before and after the line that contains the flag. The default is 1.
--files-exclude= FILES_EXCLUDE
List of files to exclude in analysis. The default are "[".git", ".github", ".vscode", ".idea"]".
--custom-regex= CUSTOM_REGEX
If you are not using Flagship, you can put a custom regex for the pattern you want to analyze.
--custom-regex-json= CUSTOM_REGEX_JSON
JSON file where you put the custom regex for the pattern you want to analyze.
--origin-platform= ORIGIN_PLATFORM
The name of the feature flag plateform you want to analyze, we support launchdarkly, optimizelyn split, vwo.
Custom regex format
Note that you should insert data without spaces, line breaks, tabulation etc... check this section in codebase analyzer doc section
flagship analyze flag list
NAME
flagship analyze flag list
- Analyze your codebase and list flags detected
SYNOPSIS
flagship analyze flag list [--directory=DIRECTORY --repository-url=REPOSITORY_URL --repository-branch=REPOSITORY_BRANCH --code-edge=CODE_EDGE --files-exclude=FILES_EXCLUDE [--custom-regex=CUSTOM_REGEX | --custom-regex-json=CUSTOM-REGEX-JSON]]
DESCRIPTION
Analyze your codebase and list flags detected, check if they exist in Flagship platform
EXAMPLES
flagship analyze flag list --directory="./" --repository-url="https://github.com/org/repo" --repository-branch="main" --files-exclude="[\".git\", \".github\", \".vscode\", \".idea\"]" --custom-regex="[{\"file_extension\":\".go?\",\"regexes\":[\"(?:Bool|String|Float64)Variation[(](?:\\\\s*[\\\"\\\\'](.*)[\\\"\\\\']\\\\s*,\\\\s*([\\\"\\\\'].*\\\\s*[^\\\"]*[\\\"\\\\']|[^)]*))\\\\s*[)]\"]}]"
FLAGS
--directory = DIRECTORY
Directory to analyze in your codebase. The default value is ".".
--repository-url= REPOSITORY_URL
The root URL of your repository, it's also used to track the links of the files where your flags are used. The default value is "https://github.com/org/repo".
--repository-branch= REPOSITORY_BRANCH
Branch of the code you want to analyze, it's also used to track the links of the files where your flags are used. The default is "main".
--code-edge= CODE_EDGE
Number of line of code you want to capture before and after the line that contains the flag. The default is 1.
--files-exclude= FILES_EXCLUDE
List of files to exclude in analysis. The default are "[".git", ".github", ".vscode", ".idea"]".
--custom-regex= CUSTOM_REGEX
If you are not using Flagship, you can put a custom regex for the pattern you want to analyze.
--custom-regex-json= CUSTOM_REGEX_JSON
JSON file where you put the custom regex for the pattern you want to analyze.
--origin-platform= ORIGIN_PLATFORM
The name of the feature flag plateform you want to analyze, we support launchdarkly, optimizelyn split, vwo.
Custom regex format
Note that you should insert data without spaces, line breaks, tabulation etc... check this section in codebase analyzer doc section
Updated about 1 month ago