-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates why this cli docs #6452
Open
Adam-it
wants to merge
4
commits into
pnp:main
Choose a base branch
from
Adam-it:add-why-this-cli
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,8 +2,62 @@ | |||||
sidebar_position: 1 | ||||||
--- | ||||||
|
||||||
# Why this CLI | ||||||
# Why this CLI? | ||||||
|
||||||
CLI for Microsoft 365 is a cross-platform CLI that allows users on any platform to manage various configuration settings of Microsoft 365. | ||||||
|
||||||
While building solutions for Microsoft 365 expands beyond the Windows operating system, managing many of the platform settings is possible only through PowerShell on Windows. As more and more users work on non-Windows machines, it's inconvenient for them to have to use a Windows virtual machine to configure their tenants. The CLI for Microsoft 365 allows them to configure their tenants no matter which operating system they use. | ||||||
- Intuitive! If you would like to `add` a new `SharePoint Online` `list` simply write `m365 spo list add` and if you need to do a different action like modifying the list or retrieving it simply change the verb to: `get`, `set`, `remove` etc. | ||||||
- Interactive by default. Starting to use a new CLI is never easy, that's why CLI for Microsoft 365 offers an interactive mode that actively asks (prompts) you for the required options of a command you want to run. You may also [configure autocomplete for commands](../user-guide/completion.mdx) and options that you're typing in the prompt for almost any terminal. | ||||||
- Managing multiple [connections](../cmd/connection/connection-list)! CLI for Microsoft 365 allows you to sign in to multiple accounts and tenants and just switch between those connections. This means you no longer need to sign out and in when you want to switch to a different tenant. | ||||||
- [Different output modes](../user-guide/cli-output-mode.mdx) allow you to choose how you want to see the results of your commands. You can choose between `json` which is optimized to be used in a script when the output of one command will be used as an input to another command, `text` which is perfect for human reading, and `csv` or even `md` (markdown) which is suitable to create a report based outcome. | ||||||
- Runs on any device in any shell. CLI for Microsoft 365 runs on Node.js and you can run it on any device and in any shell. | ||||||
- You may use it in CI/CD pipelines. It integrates easily with Azure DevOps and natively with GitHub workflows. CLI has dedicated [GitHub actions](../user-guide/github-actions) which you may use directly in GitHub workflow and it allows you to scaffold a pipeline for [Azure DevOps](../cmd/spfx/project/project-azuredevops-pipeline-add) and [GitHub workflows](../cmd/spfx/project/project-github-workflow-add). | ||||||
- ***[Manage SharePoint Framework solutions](../cmd/spfx/spfx-doctor)***. CLI for Microsoft 365 will help you setup your local environment for SPFx development and will help you with common tasks when developing SPFx solutions, like validating its correctness or getting guidance on how to upgrade it. | ||||||
- Make [CLI for Microsoft 365 your own](../user-guide/configuring-cli). CLI for Microsoft 365 offers a variety of settings that will allow you to customize it for your specific use case or needs. If going over the settings is challenging, then you will love the [m365 setup](../cmd/setup) command that will help you customize CLI for common use cases like setting it to be tailored to be run in a script. | ||||||
- AI, Of course, we have an AI! CLI for Microsoft 365 comes along with an [AI assistant chili 🌶️](../user-guide/chili) that will help you find the right commands for your tasks. | ||||||
- How many CLI's allows you to run it as your API in an app? That is what I though. [CLI for Microsoft 365 may be used as an API](../user-guide/use-cli-api) in your Node.js app. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- You may filter and sort the output of every command. [Filtering and sorting](../user-guide/filter-cli-data.mdx) is a powerful feature that allows you to get only the data you need and in the order you want. | ||||||
- Using the [verbose and debug modes](../user-guide/using-cli/#verbose-and-debug-mode) you may get more details about the command execution making everything super transparent what CLI for Microsoft 365 is performing under the hood. | ||||||
- CLI for Microsoft 365 offers a variety of commands from many different areas of Microsoft 365, for example: | ||||||
- [Entra ID](../cmd/entra/administrativeunit/administrativeunit-add) | ||||||
- [OneDrive](../cmd/onedrive/onedrive-list) | ||||||
- [OneNote](../cmd/onenote/notebook/notebook-add) | ||||||
- [Outlook](../cmd/outlook/mail/mail-send) | ||||||
- [Planner](../cmd/planner/bucket/bucket-add) | ||||||
- [Power Apps](../cmd/pa/app/app-export) | ||||||
- [Power Automate](../cmd/flow/flow-disable) | ||||||
- [Power Platform](../cmd/pp/aibuildermodel/aibuildermodel-get) | ||||||
- [SharePoint Embedded](../cmd/spe/containertype/containertype-add) | ||||||
- [SharePoint Online](../cmd/spo/spo-get) | ||||||
- [Teams](../cmd/teams/app/app-install) | ||||||
- [Viva engage](../cmd/viva/engage/engage-search) | ||||||
- and many more... | ||||||
|
||||||
Benefits of combining all these areas into single tool: | ||||||
- **Consistency**: Manage all areas in the same way, rather than having to learn how each tool for each area works. | ||||||
- **Interoperability**: Login once, manage everything, and easily pass values from one command in one area to another in another area. | ||||||
- **Convenience**: Install, manage, and learn a single tool. | ||||||
|
||||||
Interested in more? Start with our [user guide](../user-guide/using-cli.mdx) and learn how to use the CLI for Microsoft 365. | ||||||
|
||||||
## Why not another approach or a different CLI? | ||||||
|
||||||
### Why not just do things manually? | ||||||
|
||||||
Using CLI for Microsoft 365 is not about replacing the UI, it's about making your life easier. If you need to do a repetitive task, like creating a new SharePoint list every time a new project is started, you can create a script and automate this task with CLI for Microsoft 365. This way you can save time and avoid human errors. | ||||||
|
||||||
### Why not just write your own CLI or some custom console app tailored to your needs? | ||||||
|
||||||
You could, but why reinvent the wheel? CLI for Microsoft 365 is a powerful tool that is being actively developed and maintained by a team of experts. It's open-source and free to use. It's also cross-platform and works on any device. It's a great tool that can help you manage your Microsoft 365 tenant more efficiently. | ||||||
|
||||||
### Why not use SharePoint Online Management Shell? | ||||||
|
||||||
SharePoint Online Management Shell is a great tool, but it's limited to SharePoint Online and only works with Windows PowerShell. Additionally, it only supports SharePoint administration tasks, so you can only use it to run admin-related commands. In contrast, CLI for Microsoft 365 offers a variety of commands from many different areas of Microsoft 365. It's a more comprehensive tool that can help you manage your Microsoft 365 tenant more efficiently. | ||||||
|
||||||
### Why not Microsoft Graph CLI or Microsoft Graph PowerShell SDK? | ||||||
|
||||||
Microsoft Graph CLI and Microsoft Graph PowerShell SDK are amazing, but they are limited to Microsoft Graph API. CLI for Microsoft 365 integrates not only Microsoft Graph but also SharePoint (REST API and CSOM), Azure, Planner, Power Platform, and other APIs. It's a more comprehensive tool that can help you manage your Microsoft 365 tenant more efficiently. Each command documentation is 'handcrafted' not generated code which makes it more human-readable and easier to understand. Last but not least, CLI for Microsoft 365 has commands which are scenario-based and are not just wrappers around Graph API. | ||||||
|
||||||
### Why not use PnP PowerShell instead? | ||||||
|
||||||
If you use PowerShell, PnP PowerShell is a convenient solution that you can use to manage different parts of Microsoft 365. CLI for Microsoft 365 offers additional flexibility with the ability to run it in any shell. CLI for Microsoft 365 also offers unique commands to manage SPFx solutions. Whether you're a beginner or an advanced user, and want to use CLI for daily interactive use or scripting, you can configure CLI for Microsoft 365 to your needs making an invaluable tool in your toolbox. CLI for Microsoft 365- offers interactive mode by default which will actively prompt you for required options. CLI for Microsoft 365 is also more intuitive since all commands are grouped into areas like `spo` for SharePoint Online or `entra` for Entra ID, which makes it easier to find the command or operation you are looking for. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.